hg.bat loses exit code of hg invocation
Created originally on Bitbucket by idank
I couldn't find the actual hg.bat script in the sources, apologies if this is the wrong place.
This script: http://paste.pocoo.org/show/473085/ needs to propagate the exit code before exiting. Adding this right before endlocal seemed to fix it for me:
exit /B %ERRORLEVEL%