[PATCH] Check for .hgrc files in ancestor directories above the repository

Jesse Glick jesse.glick at sun.com
Mon Jan 14 09:11:37 CST 2008


Peter Arrenbrecht wrote:
> I still lean toward Maxim's proposal. No repeating of path patterns

True. I think its (minor) disadvantages are that (1) it is a little more 
to document (you need to specify a new section name, and need to specify 
how filenames are resolved); (2) you can't see all your configuration in 
one file; (3) using "re:...' syntax for patterns is impossible because 
keys cannot contain ':' (though '[...]' would likewise not be possible 
inside section names). I don't have a strong opinion though.

> trivial reuse of existing config parser.

Using @-sections would not involve parsing any additional files at all, 
much less changes to the existing config parser; just a small block in 
localrepo's constructor to copy keys from matched sections into the 
normal section names, before parsing .hg/hgrc.



More information about the Mercurial-devel mailing list