ProjrcExtension questions
Angel Ezquerra
angel.ezquerra at gmail.com
Fri Dec 16 12:51:10 UTC 2011
On Fri, Dec 16, 2011 at 1:23 PM, Martin Geisler <mg at aragost.com> wrote:
> 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.
That seems to be one of the problems. "hg showconfig extensions" returns:
extensions.highlight=
extensions.bookmarks=
extensions.bugzilla=
extensions.churn=
extensions.color=
extensions.convert=
extensions.graphlog=
extensions.largefiles=
extensions.mq=
extensions.notify=
extensions.patchbomb=
extensions.progress=
extensions.projrc=E:\aem\Workspaces\mercurial\hgrcshare\projrc.py
extensions.purge=
extensions.rebase=
extensions.transplant=
Which means that the highlight extension has been properly enabled. If
I manually edit the projrc file and remove the reference to the
highlight extesion then it is not shown by "hg showconfig extensions".
So it seems that TortoiseHg settings dialog is not picking up the
change. My next step will be to check whether the settings are still
used by TortoiseHg when it runs a mercurial command.
Am I correct in assuming that most users of this extension do not use
TortoiseHg?
>> 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.
Great advice as always. Thanks!
Angel
More information about the Mercurial
mailing list