HG outgoing is documented as returning the following exit codes from "hg help out": Returns 0 if there are outgoing changes, 1 otherwise. However, a zero exit code is now being returned on our Windows computers when there are no outgoing changes to push. ------------ To reproduce ------------ Enable largefiles extension. Load a command prompt and navigate to a folder where you can perform the test. Run the following commands: mkdir test cd test hg init cd .. hg clone test test2 cd test2 hg out echo %ERRORLEVEL% Note that the exit code returned is 0 and not 1 as documented. This does work as described if the largefiles extension is NOT enabled. --------- Rationale --------- This has caused problems with one of our automated builds which had a stage that would check that there are no outgoing changes not pushed to our master repository. We have performed a work around using "hq out -q" to a temp file and then checking if this file is empty. This may be useful for anyone else who is also relying on the exit code for hg out until this can be properly fixed.
Patch submitted here: http://www.selenic.com/pipermail/mercurial-devel/2012-September/044030.html Beware that there are other commands with similar issues- patches for them are also in that series.
Fixed by http://selenic.com/repo/hg/rev/98d6a10bc401 Matt Harbison <matt_harbison@yahoo.com> largefiles: preserve exit code from outgoing command (issue3611) This maintains the exit codes documented in commands.py. (please test the fix)