I\'d like to keep two ~/.hgrc files: ~/.hgrc and ~/.hgrc.local – one with \"standard\" settings (eg, username
), the other with machine-specific settings (eg, se
I solve this problem for all my "dot files" in a similar way. On login my shell checks a list of files (hgrc, vimrc, ....) and checks if any of them is older than ${that_name}.global
or ${that_name}.local
. If it is - cat ${that_name}.{global,local} > ${that_name}
. Simple and works great so far. While there's a "better" way (using %include
) sometimes processing the config files manually has advantages - for example it will work with mercurial pre-1.3.