I would like parent directories of projects to include an hgrc file that a repo in that folder inherits from, e.g.
~/work/
~/work/hgrc
~/work/project1/
~/work/project2/
~/personal/hgrc
~/personal/project1
~/personal/project2
~/personal/project3
Any project in work should inherit from work/hgrc
, and any in personal should inherit from personal/hgrc
. I was thinking of adding a script to ~/.hgrc
that on clone would search for any hgrc files in parent directories and %include
them if they exist, but this has the uglyness that if I add an hgrc below it after I clone it it won't be included. Only a 5% of the time consideration, but still...
How about putting:
inside each repo's .hg/hgrc? You could even do that automatically but putting this in your systemwide
/etc/mercurial/hgrc
:I've not tested that hook. :)