Hackable Mercurial Can't Find os Module

Adrian Buehlmann adrian at cadifra.com
Wed Aug 26 22:41:03 UTC 2015


On 2015-08-26 23:06, Jensen, Aaron wrote:
> I'm trying to get hackable Mercurial working [1] on Windows 7 x64. I've got  Mercurial 2.5.4 installed with TortoiseHg 2.7.2.
> 
> My initial problem was the packaged hg.exe couldn't load the Python DLL. I found an old mailing list thread with this exact error [2], where the solution was to add the included hg-python26 directory to my PATH variable. I did that, but now I'm getting this error:
> 
>     > .\hg.exe in
>     'import site' failed; use -v for traceback
>     Traceback (most recent call last):
>       File "F:\Build\hhg\hg", line 10, in <module>
>         import os
>     ImportError: No module named os
> 
> When I add the -v option for traceback, the error message is the same.
> 
> What additional setup steps do I need to do?
> 
> 
> [1] https://mercurial.selenic.com/wiki/HackableMercurial
> 
> [2] https://selenic.com/pipermail/mercurial/2014-February/046641.html

Perhaps the commit message of 93d97a212559 might be helpful when
investigating your problem:

  https://selenic.com/hg/rev/93d97a212559

This was the last thing I did on that front, but I forgot the details.

I think my original motivation with hg.exe back then was to get more of
Mercurial's testsuite running on my Windows box, initially using a
regular, globally installed Python (that was installed using an official
*.msi installer for Windows, as provided by the Python folks, which
allow to have parallel installs of various major Python versions without
having to have any of them in PATH).

I think the goal of 93d97a212559 was to make hg.exe compatible with the
preexisting HackableMercurial, using a Python right "next" to the
hg.exe, which I'm pretty sure worked as intended when I sent the patch
doing 93d97a212559 back then.

I'm not really a regular contributor anymore though, so I'm likely not
able to provide further help on this, because I simply forgot many details.



More information about the Mercurial mailing list