I have a long standing problem: at work we\'re using mercurial as a DSCM, but we can\'t figure out how to keep our config files in sync.
The problem is that we want
It's a bit of a bastardization, but you could use the KeywordExtension to automatically expand tokens. In your config file put something like this:
db.host = $DBHOST$
db.host = $DBUSER$
db.host = $DBPASS$
and then in their ~/.hgrc files user's would have something like this:
[extensions]
hgext.keyword=
[keyword]
# expand keywords in all python files in working dir
**.conf =
[keywordmaps]
DBHOST = dev.server.internal
DBUSER = myname
DBPASS = mypass
Production, of course, would have its own .hgrc.
The scheme would cost everyone a little bit of set up time once, but after that it should be automatic. Defaults could be in the system-wise /etc/mercurial/hgrc file in case the user didn't want to set their own private connection strings.