I'm looking for a solution to have one .hgrc for mercurial to work in all my working environments(win/lin/mac), just like one vimrc to rule all.
It comes to a problem when I have to specify the path for some extensions, for example, hg-git:
on windows:
[extensions]
hggit = E:\hg-git\hggit
on linux/mac:
[extensions]
hggit = ~/hg-git/hggit
For vimrc, we have solution to distinguish different platform, like
if has('win32')
...
endif
Knowing that mercurial's hgrc is barely a normal ini file, I wonder if there is similar solution for hgrc file.
Or maybe some other solution?
Update
Thanks for mentioning using "custom environment variable instead of hard coding", that works for extensions' path.
However, to make extensions work is just one goal. I believe there are other configurations' behavior that depends on platform, like in http://www.ogre3d.org/docs/OGREDeveloperGuide/index.html, specific options are needed for Windows and Mac. How to solve this kind of problem?