how to configure the global .hgrc file from the commandline

Tony Mechelynck antoine.mechelynck at gmail.com
Sun May 24 14:45:13 UTC 2020


On Sun, May 24, 2020 at 4:37 PM Tony Mechelynck
<antoine.mechelynck at gmail.com> wrote:
>
> On Sun, May 24, 2020 at 2:35 PM Uwe Brauer <oub at mat.ucm.es> wrote:
> >
> >
> >
> > Hi
> >
> > That may sound bizarre. But lately I collaborate with colleagues, who
> > don't have much interest in OS details, and use different OS. So it is
> > sometimes not clear to me, especially for Windows users, where the
> > corresponding global .hgrc is located.

See "hg help hgrc", paragraph "On Windows"
> >
> > That's why I would like to know how one could configure the global .hgrc
> > file from the command-line, especially adding extensions.
> >
> > I googled but could not find anything
> > Thanks
> >
> > Uwe Brauer
>
> To enable, let's say, the mq extension "as if" there was a line "mq="
> in section "[extensions]":
>
> hg --config extensions.mq= (other global options) (hg command)
> (specific options)
>
> This --config global option may be repeated any number of times, with
> section.name=value as its argument. It is mentioned on the "hg help"
> page but you may need to scroll down to see it.

P.S. It applies only to _this particular run_ of Mercurial; it changes
nothing to the permanent config files but overrides anything in them
that it contradicts.
>
> Best regards,
> Tony.



More information about the Mercurial mailing list