[PATCH] run-tests: fix exename on Windows

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Dec 11 17:15:30 CST 2012


On 12 déc. 2012, at 00:10, Siddharth Agarwal wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1355267418 28800
> # Node ID a6ee8ebc9872e644b539ae86ec1bed66fddd2880
> # Parent  68acf6ab9cf63c9dd9314a55be7e63b1ae0f3ef1
> run-tests: fix exename on Windows
> 
> diff -r 68acf6ab9cf6 -r a6ee8ebc9872 tests/run-tests.py
> --- a/tests/run-tests.py	Tue Dec 11 14:46:45 2012 -0800
> +++ b/tests/run-tests.py	Tue Dec 11 15:10:18 2012 -0800
> @@ -361,7 +361,7 @@
>         if os.path.dirname(path) == exedir:
>             return
>     else:
> -        exename = 'python'
> +        exename = (sys.platform == 'win32') and 'python.exe' or 'python'

We usually use and explicite else clause for this purpose.


-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list