Development branch setup/usage, repositories roles

Patrick Mézard pmezard at gmail.com
Thu Jun 22 13:07:06 CDT 2006


Benoit Boissinot wrote:
> On 6/22/06, Patrick Mézard <pmezard at gmail.com> wrote:
>> Hello,
>>
>> I have two questions related to mercurial development:
>>
>> 1- How do you manage a mercurial repository?
>> Mercurial uses itself to maintain its source code which is great.
>> However, I am having conflicts between the installed, stable hg version
>> (currently a Windows binary package) and the one kept in the development
>> repository, for instance the development "mercurial/" subdirectory is a
>> valid python module which overrides the installed one when calling "hg"
>> from the development root directory.
>>
> You can change the 'hg' python script to do at the beginning:
> import sys
> sys.path.pop(0)
>
> This way it will remove the first entry from the python path and avoid
> using your local modules.
Unfortunately, it probably won't work because the current directory 
seems to be added twice to sys.path. See the response to Matt Mackall. 
However you are right that something could probably be done by 
evaluating and removing paths from sys.path.

Besides, assuming this trick works flawlessly, I cannot use it since the 
stable hg version I have is bundled by py2exe. It means that all 
dependant packages are wrapped in a single zip file (library.zip). I 
tried to recompile a modified version of hg.py and replace the one in 
library.zip using command line zip tools but it fails for some reason. I 
think the zip archive generated by py2exe is customized to allow DLLs to 
be loaded directly from it. So, the only way to go would be to replay 
py2exe, which I am reluctant to do right now :-).

Anyway, thank you for your help.

Patrick Mézard


More information about the Mercurial mailing list