[PATCH] Support remote access to (some) "hgrc" parameters

Glenn Ammons ammons at us.ibm.com
Thu Jan 3 03:29:36 CST 2008


"Peter Arrenbrecht" <peter.arrenbrecht at gmail.com> writes:

> What is the point? Can [public.foo] already be used interchangeably
> with [foo] for the purpose of configuring things, or will public.*
> have to be queried separately by future configurable elements? What am
> I missing here?
> -peter

Sorry, I should have given more context in the patch.

I'm writing an extension of "hg pull" and "hg push"; the extension
needs to query the configuration of the source/target repository but
there's currently no way for an extension to do that.  I asked about
remote access a few weeks ago, to an unenthusiastic reception, but
thought that an implementation would be something concrete to talk
about, particularly since one of the objections was about
over-complicating the protocols.  The previous thread starts here:

    http://www.selenic.com/pipermail/mercurial-devel/2007-November/003559.html

To answer your second question, there is no relation between
parameters in [public.foo] and those in [foo].  They are separate
sections.  The first one is accessible remotely.

Most extensions won't have to worry about the distinction and, as long
as they don't name their sections "public.<something>", their
parameters will _not_ be accessible remotely.  Only extensions that
want to make a parameter accessible remotely need worry, and they can
make up their own conventions about which parameters should appear
where.  A reasonable convention might be that an extension named "foo"
looks for its public parameters in [public.foo] and its private
parameters in [foo].

Regards.
--glenn


More information about the Mercurial-devel mailing list