ProjrcExtension questions

Angel Ezquerra angel.ezquerra at gmail.com
Mon Dec 19 08:44:50 CST 2011


On Mon, Dec 19, 2011 at 12:13 PM, Martin Geisler <mg at lazybytes.net> wrote:
> Angel Ezquerra <angel.ezquerra at gmail.com> writes:
>
>> On Fri, Dec 16, 2011 at 1:23 PM, Martin Geisler <mg at aragost.com> wrote:
>>> Angel Ezquerra <angel.ezquerra at gmail.com> writes:
>>>
>>>> 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?
>
> That's a good question, maybe David can shed more light on this.

I'm thinking that it may make sense to have a third panel appear on
the TortoiseHg settings dialog if the projrc extension is enabled,
which would show the projrc settings in a read-only manner....

Angel


More information about the Mercurial mailing list