| 1 |
@echo off |
| 2 |
rem Windows Driver script for Mercurial |
| 3 |
|
| 4 |
setlocal |
| 5 |
set HG=%~f0 |
| 6 |
|
| 7 |
set PYTHONLEGACYWINDOWSSTDIO=1 |
| 8 |
|
| 9 |
rem Use a full path to Python (relative to this script) if it exists, |
| 10 |
rem as the standard Python install does not put python.exe on the PATH... |
| 11 |
rem Otherwise, expect that python.exe can be found on the PATH. |
| 12 |
rem %~dp0 is the directory of this script |
| 13 |
|
| 14 |
if exist "%~dp0..\python.exe" ( |
| 15 |
"%~dp0..\python" "%~dp0hg" %* |
| 16 |
) else ( |
| 17 |
python "%~dp0hg" %* |
| 18 |
) |
| 19 |
endlocal |
| 20 |
|
| 21 |
exit /b %ERRORLEVEL% |