[PATCH] test-hook: use sh when running hg in hooks

Adrian Buehlmann adrian at cadifra.com
Sun Jun 17 20:13:06 CDT 2012


On 2012-06-18 02:49, Mads Kiilerich wrote:
> Adrian Buehlmann wrote, On 06/18/2012 02:16 AM:
>> On 2012-06-18 01:47, Mads Kiilerich wrote:
>>> Adrian Buehlmann wrote, On 06/17/2012 09:49 AM:
>>>> # HG changeset patch
>>>> # User Adrian Buehlmann <adrian at cadifra.com>
>>>> # Date 1339917294 -7200
>>>> # Node ID a0f221f45f846aea982355840c614d6fced41edb
>>>> # Parent  6df859e0a6cd261eb5dea82b4a6b4186a662a650
>>>> test-hook: use sh when running hg in hooks
>>>>
>>>> This eliminates the requirement (for this test) to have a hg.exe (on $PATH) when
>>>> running on Windows.
>>>   From one point of view:
>>> I think it would be fine to support testing in such an environment ...
>>> of course assuming the wiki had a description of how to make such a
>>> setup ... and why.
>>>
>>>   From another point of view (which might be the same):
>>> Is it really relevant to test Mercurial in an environment where you
>>> can't run 'hg' in a native shell? One thing is to rely on msys for
>>> executing the test scripts, but is it relevant to rely on msys bash for
>>> launching Mercurial with the right Python? How realistic is a Windows
>>> Mercurial setup where you don't have a hg.exe (from exemaker or py2exe)?
>> So we have to depend on exemaker for running the testsuite?
> 
> I don't know - that is why I am asking.
> 
> But I do know that the only existing documentation for running the test 
> suite on windows is closely related to the 'hackable' approach and do 
> include an exemaker hg.exe. That could of course be changed if done 
> openly and explicitly, especially if there is good reasons for changing 
> it and it is done.
> 
> My initial goal was to show that it was possible to extend the 
> 'hackable' approach to run sh tests with the msys already used for 
> building 'hackable'.
> 
> It seems like you don't agree with the premises of 'hackable', so you 
> might have a different goal. But it seems to me like if exemaker is 
> better than the alternatives for a windows developer (with the 
> alternatives hg.cmd, hg.exe from py2exe, msys with hg hash-bang and 
> python in path, and hg.py).

I think the main goal of the testuite should be that we can test
mercurial. And I would love to do that with the least amount of external
hacky parts needed.

We have seen that there is no way around using the MSYS shell - short of
rewriting the tests or forking/rewriting the MSYS shell. So, we can and
have to use the MSYS shell.

HackableMercurial is certainly nice, but not needed for testing. As such
the two are unrelated. But they play in the same corner.

Something I don't like with the exemaker is that we have to build two
versions of it: one for x86 and one for x64. And that exemaker doesn't
exactly look like a component I want to have in the loop when digging
after the next dll manifest hell problem.

But If you say we have to live with that exemaker and depend on it, then
I'll jump through that hoop as well.

But if possible, I'd prefer not having to depend on it in the testsuite.
The exemaker.exe (or hg.exe) is largely a convenince thing, not really
something we absolutely need. The process you run on Windows is
python.exe, nothing else.


More information about the Mercurial-devel mailing list