views:

39

answers:

1

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?

+1  A: 

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?

tonfa
Thanks for the information. I agree, it's not a good default, but I also think it's reasonable to allow a user to override it.
ataylor