x64 hg.exe

Adrian Buehlmann adrian at cadifra.com
Fri Jun 22 07:19:31 CDT 2012


On 2012-06-22 13:08, Mads Kiilerich wrote:
> On 22/06/12 11:30, Adrian Buehlmann wrote:
>> On 2012-06-22 03:42, Adrian Buehlmann wrote:
>>> Copy the hg file to hg.py, replace the first line with
>>>
>>>    #!C:\Windows\system32\python27.dll
>>>
>>> (for a global installed Python 2.7)
>>>
>> The hg file (mercurials python script in the repo root) needs to be
>> *renamed* to hg.py (not copied), otherwise the suite (MSYS shell) will
>> prefer the hg over the hg.exe for most of the calls in the tests, which
>> works because of the
>>
>>    #!/usr/bin/env python
>>
>> on the first line of the hg file (after all, python is in on PATH and
>> there is a env.exe in C:\MinGW\msys\1.0\bin, which is on PATH as well).
> 
> Yes, we have discussed that before. The wiki used to say that 'hg' 
> should be removed and replaced by 'hg.exe' and 'hg.py', but I removed 
> that prerequisite in 
> http://mercurial.selenic.com/wiki/HackableMercurial?action=diff&rev1=29&rev2=30 

It's not like the testsuite wouldn't pass with the hg left in place
there though (at least that's what I think).

But it's probably not what we want any more: We most likely don't want
to have the hg called for most of the test calls (happens via sh and
env), if we put a hg.exe there.

If we have both a hg.exe and hg there, then most of the test calls
happen to call the hg (via env) - not the hg.exe. Only a very small
number of test calls (e.g. commandserver) are really picking up the
hg.exe and thus absolutely depend on it.

If we remove the hg file (which was placed there by checking out a
revision of mercurial), we totally force depending on the hg.exe. For
everything.

And obviously, if I want to know whether the hg.exe I built works for
all hg calls in all tests, I want it to be used by all calls. And I can
currently only achieve that by removing the hg file. Because if there is
a hg file, it will be given preference over the hg.exe.

I hope I described and understood that now correctly and completely.




More information about the Mercurial-devel mailing list