hgrc.5.text FILES content, ordering implied?

Martin Geisler mg at lazybytes.net
Thu Aug 27 03:11:31 CDT 2009


Douglas Philips <dgou at mac.com> writes:

> 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?

The idea is to accumulate configuration values from different files,
loaded in order from least specific (/etc/mercurial on Unix) to most
specific (.hg/hgrc). I think that is fine as it is.

The question is mostly if we should let hg read mercurial.ini on Unix
systems?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list