Bug 3938 - Blackbox not recording exit codes
Summary: Blackbox not recording exit codes
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: blackbox (show other bugs)
Version: 2.6
Hardware: PC Linux
: normal bug
Assignee: Durham Goode
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-20 11:21 UTC by Matt Mackall
Modified: 2013-07-23 18:36 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Mackall 2013-05-20 11:21 UTC
$ hg pull
^Cinterrupted!
$ echo $?
255
$ cat .hg/blackbox.log
2013/05/20 10:18:42 mpm> pull
2013/05/20 10:18:43 mpm> pull exited None after 0.37 seconds
Comment 1 HG Bot 2013-05-23 19:00 UTC
Fixed by http://selenic.com/repo/hg/rev/41e39a0299cb
Durham Goode <durham@fb.com>
blackbox: fix recording exit codes (issue3938)

Previously the blackbox wrapped runcommand, but this failed to see the error
codes that were created if an exception occurred. I moved that logging to now
wrap _runcatch, so it can observe and log the actual error code (such as when
a user ctrl+c's during a command).

Updated the tests as well. Tested the change by running all the tests with the
blackbox extension enabled and verifying nothing broke (aside from things that
printed what extensions were enabeld).

The progress tests are affected by calls to time.time() so they needed to be
updated to pass.

(please test the fix)