hgrc.5.text FILES content, ordering implied?

Steve Borho steve at borho.org
Wed Aug 19 11:19:13 CDT 2009

On Wed, Aug 19, 2009 at 10:01 AM, Douglas Philips<dgou at mac.com> wrote:
> My question is about the (Windows) entries in this part of the FILES
> section:
>        (Unix) $HOME/.hgrc, (Windows) %HOME%\Mercurial.ini, (Windows)
>        %HOME%\.hgrc, (Windows) %USERPROFILE%\Mercurial.ini, (Windows)
>        %USERPROFILE%\.hgrc
> Is it intended to convey that Mercurial will look for the files in the
> order given?
> I ask because in my naiveté I assumed I could have both a .hgrc for my
> *nix systems and Mercurial.ini for my Windows systems (e.g. paths on
> the same kinds of system are the same, but *nix and Windows have very
> different paths). However, it seems that when I have both .hgrc and
> Mercurial.ini, hg on Windows (1.3.1, which was installed with
> TortoiseHg 0.8.1) reads my .hgrc first.
> Did I misread by presuming that the order of the files was
> significant, or is there a bug?

The documentation does not match the actual behavior.  Mercurial looks
in each directory in the user rcpath for both mercurial.ini and .hgrc
files and reads them both.

Steve Borho

More information about the Mercurial-devel mailing list