ProjrcExtension questions

Martin Geisler mg at aragost.com
Fri Dec 16 06:23:23 CST 2011


Angel Ezquerra <angel.ezquerra at gmail.com> writes:

Hey Angel,

> I'm trying to setup the ProjrcExtension
> (http://mercurial.selenic.com/wiki/ProjrcExtension) and I am having
> some problems. Perhaps someone that has used it (or developed it,
> right Martin? *hint* *hint* ;-) ) can help me figure out what I am
> doing wrong.

Well, I'll be happy to try :)

> I setup a repository and I added a projrc file to the .hg folder. The
> .hg/projrc file contents were:
>
> [extensions]
> highlight=
>
> The idea was to try to see if I could automatically enable an
> extension. The particular extension that I was trying to enable does
> not matter.
>
> I started the mercurial web server on that repo and cloned
> http://localhost:8000. This created a clone of the repository which
> has a copy of the projrc file in its .hg folder.

That's good -- the projrc extension works on both ends then. What's left
is to load the settings and load them at the right moment. There are
some things that you cannot do in the projrc file: you cannot make it
disable an extension. This is simply because the extension might have
been loaded already when the projrc extension is initialized and so it's
too late to set 'extensions.foo = !'.

> The problem is that when I opened the clone in TortsoiseHg and when to
> the settings dialog the extension was not enabled.

Okay... try 'hg showconfig extensions' from the command line instead.
I've never tested this with TortoiseHg.

> I then changed the source repository .hg/projrc file to:
>
> [tortoisehg]
> forcerepotab = False
>
> On the clone I stripped one and then I pulled from the source. This
> did not update the clone's .hg/projrc file as I would expect.

That sounds strange -- the projrc file should be transferred on all
pulls.

> On the other hand I created a new clone and the new clone did have a
> copy of the new projrc file. However, I don't see the forcerepo tab
> TortoiseHg setting disabled on this second clone either.
>
> What is going in? Is this even supposed to work? I mean, is TortoiseHg
> meant to pickup the changes in the projrc file?

Apparently not -- you should start with the basics first and make sure
that Mercurial sees the changes as it's supposed to. That's a general
advice when things don't work: simplify things and remove variables from
your equation until you've found the essentials.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial mailing list