hgrc.5.text FILES content, ordering implied?

Douglas Philips dgou at mac.com
Wed Aug 26 16:55:13 CDT 2009

On 2009 Aug 26, at 5:34 PM, Martin Geisler wrote:
> The responsible code is this:
>  http://www.selenic.com/hg/index.cgi/file/37042e8b3b34/mercurial/posix.py#l45
>  http://www.selenic.com/hg/index.cgi/file/37042e8b3b34/mercurial/windows.py#l80
> You can see that the Windows code explicitly looks for both '.hgrc'  
> and
> 'mercurial.ini' whereas the Posix file looks for '.hgrc' only.
> I don't know why it is inconsistent like this -- I would have expected
> it to either read both files on all systems or read just a single
> system-specific file on each system.

I'm perfectly happy to submit patches, but is it to thw hgrc man page  
or is it the consumer of user_rcpath()'s results that should be  
stopping after it finds one of the "candidate" files? (Hmmm, that  
seems tricky given the existing code in ui.py ui.__init__:
     # ...
     for f in util.rcpath():
         self.readconfig(f, trust=True)

It seems that the assumption in ui.py is that the list is completely  
The assumption in windows.py is that hey, try any one of these. And in  
the middle, those get glommed on to all the other "rc" files to try. :(

Not having a good feeling about how to clean the code up...


More information about the Mercurial-devel mailing list