Subject: [bug#48232] [PATCH 0/2] Add mercurial-commitsigs and some changes to Mercurial.

From: Xinglu Chen <[email-masked]>
Date: Tue, 11 May 2021 15:17:19 +0200

On Tue, May 11 2021, Ludovic Courtès wrote:

>>>> However, I am not sure this is the best approach since it messes with
>>>> PYTHONPATH, AFAIK there is no such things as a HGEXTENSIONS variable I
>>>> could set.  Another problem is that I have to hardcode “python3.8”, this
>>>> would obviously have to be updated if the default Python version gets
>>>> updated.  I did try to do something like this:
>>>
>>> Messing up with PYTHONPATH is indeed not great since it “belongs” to
>>> Python.
>>>
>>> Could we instead patch Mercurial so it honors a specific environment
>>> variable, like HG_EXTENSION_PATH?
>>
>> I am not familiar with the Mercurial codebase, but I guess we could try.
>> Or perhaps we could wrap the ‘hg’ binary to set PYTHONPATH so it finds
>> the extensions.
>
> I think wrapping is not an option because the wrapper doesn’t know where
> the profile is.

Oh, right.

> Let’s see if you can adjust hg to honor a new environment variable,
> and if not, we’ll see…

Hmm, I will try to see what I can do.