[PATCH] run-tests: alias hg to hg.exe for Windows

Adrian Buehlmann adrian at cadifra.com
Wed Jun 27 09:11:52 CDT 2012


On 2012-06-27 15:07, Adrian Buehlmann wrote:
> On 2012-06-27 03:17, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1340759693 -7200
>> # Node ID 52b63762a69feaf2e2a959a41a4d6947d0c922b0
>> # Parent  ab4644c3064fd12738b18d6f65c6acd5799d57b3
>> run-tests: alias hg to hg.exe for Windows
>>
> 
> [..]
> 
>>
>> diff --git a/tests/run-tests.py b/tests/run-tests.py
>> --- a/tests/run-tests.py
>> +++ b/tests/run-tests.py
>> @@ -617,6 +617,7 @@
>>          script.append('set -x\n')
>>      if os.getenv('MSYSTEM'):
>>          script.append('alias pwd="pwd -W"\n')
>> +        script.append('alias hg=hg.exe\n')
>>      for n, l in enumerate(t):
>>          if not l.endswith('\n'):
>>              l += '\n'
> 
> Oh. I think I found something pretty sweet instead:
> 
> Add
> 
>   alias hg=hg.exe
> 
> to
> 
>   C:\MinGW\msys\1.0\etc\profile
> 
>>From then on, every freshly started sh.exe has that alias.

Without the patch, but with the alias in C:\MinGW\msys\1.0\etc\profile
and the hg file removed, all (non-skipping) tests but

  Failed test-convert.t: output changed
  Failed test-merge-tools.t: output changed

pass. These two pass, if I additionally reestablish the hg file (that
is, having both the hg.exe and hg file in the same dir).

So, with that alias in C:\MinGW\msys\1.0\etc\profile in place, we can
have both the hg file in place and have the hg.exe used.

I think that's pretty awesome.

I'm in favor of officially decreeing that alias in
C:\MinGW\msys\1.0\etc\profile.

It also works well with the hg.exe from TortoiseHg, which I have in my
default PATH.




More information about the Mercurial-devel mailing list