Search code examples
mercurialglobhgrc

Is the mercurial default glob matching syntax configurable?


To run a command on a single file, I recently realized I can do this:

hg log relglob:UniqueFilename

instead of:

hg log some/really/deep/directory/hierarchy/UniqueFilename

I'd like to take this one step further and make relglob the default matching syntax. Is this possible?


Solution

  • No it's not possible with a configuration option. You could change the match default from relpath to relglob: http://hg.intevation.org/mercurial/crew/file/8bc4ad7e34c8/mercurial/cmdutil.py#l272

    But I'm really not sure it is a good idea, for example what if you have several files with the same name?