Precedence of --config options

Martin Geisler mg at lazybytes.net
Sun Nov 13 12:25:29 CST 2011


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

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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111113/1eb3ac27/attachment.pgp>


More information about the Mercurial-devel mailing list