Patch: Regular expression support for convert extension's 'filemap' option.

Mads Kiilerich mads at kiilerich.com
Thu Jul 8 13:55:26 UTC 2010


  I just posted a patch that tries to make the documentation in this 
area more clear. Feel free to improve so we know what we have before we 
even consider changing it.

And:

Martin Geisler wrote, On 07/07/2010 09:58 AM:
> Please also see this recent thread about adding support for glob
> patterns to the convert extension:
>
>    http://markmail.org/message/mwjc37unpbvzmqka
>
> We should definitely have this functionality! We have some
> infrastructure in place already in the match module for dealing with
> regexp and glob patterns, so we can preferably reuse that. Something like
>
>
>    exclude foo/bar      # normal patch
>    include re:.*\.jpg$  # regexp
>    include glob:*.png   # glob
>
> See 'hg help patterns' for some syntax examples.

That would make it harder to detect ambiguous include/excludes and to 
control the precedence. How would you do that while staying 
("sufficiently") backward compatible?

While we are discussing this area: If we support regexp in 
include/exclude then it is a reasonable expectation that we also do it 
in rename, with proper use of references to matching groups...

/Mads



More information about the Mercurial mailing list