Questions about contributing

Martin Geisler mg at
Thu Sep 8 08:38:24 CDT 2011

Ben Hughes <ben at> writes:

Hi Ben,

Please keep the list in Cc.

>> 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.
> I was thinking of storing the value as a variable in the python
> source. So unless there's some non-python code that access .hg, it
> should be ok, shouldn't it? (That's a genuine question: at the moment
> I'm still very unfamiliar with the Mercurial codebase)

Oh, you could do that and it would work fine. I guess you can put it in
scmutil and reference that from the other parts of the code.

>> 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.
> That's great to know, thanks. It may make git a better candidate for
> what we are doing, although because our app is cross-platform we were
> hoping to take advantage of Hg's ease of installation/use on Windows.

Good point.

Martin Geisler

aragost Trifork
Professional Mercurial support

More information about the Mercurial-devel mailing list