Precedence of --config options
Jason Harris
jason at jasonfharris.com
Sun Nov 13 12:37:02 CST 2011
On Nov 13, 2011, at 7:25 PM, Martin Geisler wrote:
> Jason Harris <jason at jasonfharris.com> writes:
>
>> Hi,
>>
>> I was wondering if the following is a bug or intended behavior: (This came up from an issue in MacHg.)
>>
>> If I have some extension set in my ~/.hgrc, eg:
>>
>> -----------
>> [extensions]
>> hgext.histedit = /Users/jason/Library/MercurialExtensions/histedit/hg_histedit.py
>> -----------
>>
>> But I have also copied the extension into the main Mercurial layout by adding the extension here (and changing the name):
>>
>> /Library/Python/2.7/site-packages/hgext/histedit/__init__.py
>>
>> (This is the place in OSX where mercurial resides (with the default install...))
>>
>> Then if I call from the command line:
>>
>> hg histedit --config ext.histedit=/Library/Python/2.7/site-packages/hgext/histedit/__init__.py --rev 3576
>
> I only skimmed the rest of your mail since this looks wrong. You would
> need to use
>
> --config extensions.hgext.histedit=something
Doh! Thanks! That works...
Cheers,
Jas
> --config extensions.histedit=something
> to override the config value above. The format is
>
> --config <section>.<key>=<value>
>
> so you need the exact same <section> and <key> on the command line as in
> the config file.
>
> When that matches, then the --config settings should override the
> configuration files just fine.
>
> --
> Martin Geisler
>
> Mercurial links: http://mercurial.ch/
More information about the Mercurial-devel
mailing list