Questions about contributing

Martin Geisler mg at aragost.com
Thu Sep 8 08:09:57 CDT 2011


Ben Hughes <ben at benrhughes.com> writes:

>> Getting the value for ".hg" from an environment variable seems like
>> the best solution since it is a global setting for the entire program
>> and a setting that needs to kick in before config files are read.
>
> I'm not sure about that: an environment variable would (to me) make
> too easy to change, which could lead to some of the problems that the
> other guys have been pointing out.

Well, if it's not in an environment variable then Mercurial wont be able
to know that it should read, say, _hg/hgrc instead of .hg/hgrc. Unless
you configure this in your global ~/.hgrc file.

Git has a GIT_DIR environment variable (and a --git-dir command line
flag) that can be used to change ".git" into something else. From what I
can see, you cannot set GIT_DIR with a configuration file.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial-devel mailing list