[PATCH] convert: support glob patterns in filemap directives

Greg Ward greg-hg at gerg.ca
Sun Apr 11 14:29:52 CDT 2010


On Wed, Mar 24, 2010 at 9:52 PM, Tessa Starkey <testarkey at gmail.com> wrote:
> # HG changeset patch
> # User Tessa Starkey <testarkey at gmail.com>
> # Date 1269481039 14400
> # Node ID f428cd7661d07c6dd379760ccb99f51dcd359abb
> # Parent  d9aa5b368e36c10d2c29411772fef9fd339c2e9f
> convert: support glob patterns in exclude and include filemap directives
>
> This is implemented using the matcher from the mercurial core, in order to
> make the it more consistant and avoid rewriting the matching code.

Disclaimer: I am not an expert on the filemap feature.  I have peeked
in there once or twice, that's all.  But this seems like a useful
feature and a nice opportunity to use the match class in another part
of Mercurial, so I'll contribute a superficial review.  (I did not
actually apply the patch and try it out.)

> @@ -63,6 +67,13 @@
>                              (lex.infile, lex.lineno, cmd))
>                 errs += 1
>             cmd = lex.get_token()
> +        #deal with svn urls for files
> +        if self.root.startswith("file://"):
> +            self.root = self.root[7:]

Is this just for svn->hg conversions?  Does this mean that the path to
a local svn repo is passed as a "file://" URL rather than as a simple
filesystem path?  If so, that sounds like a bug in svn_source, and
should probably be addressed there with a separate patch.

Greg


More information about the Mercurial-devel mailing list