diff --git a/contrib/win32/hg.bat b/contrib/win32/hg.bat --- a/contrib/win32/hg.bat +++ b/contrib/win32/hg.bat @@ -15,3 +15,5 @@ if exist "%~dp0..\python.exe" ( python "%~dp0hg" %* ) endlocal + +exit /b %ERRORLEVEL% diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -525,3 +525,12 @@ return code of command and shell aliases [1] $ hg exit1 [1] + +#if no-outer-repo + $ hg root + abort: no repository found in '$TESTTMP' (.hg not found)! + [255] + $ hg --config alias.hgroot='!hg root' hgroot + abort: no repository found in '$TESTTMP' (.hg not found)! + [255] +#endif