##// END OF EJS Templates
dispatch: mask negative exit code recorded in blackbox log...
Yuya Nishihara -
r38043:c3fd9a0f default
parent child Browse files
Show More
@@ -239,7 +239,7 b' def dispatch(req):'
239 req.ui.log('uiblocked', 'ui blocked ms',
239 req.ui.log('uiblocked', 'ui blocked ms',
240 **pycompat.strkwargs(req.ui._blockedtimes))
240 **pycompat.strkwargs(req.ui._blockedtimes))
241 req.ui.log("commandfinish", "%s exited %d after %0.2f seconds\n",
241 req.ui.log("commandfinish", "%s exited %d after %0.2f seconds\n",
242 msg, ret, duration)
242 msg, ret & 255, duration)
243 try:
243 try:
244 req._runexithandlers()
244 req._runexithandlers()
245 except: # exiting, so no re-raises
245 except: # exiting, so no re-raises
@@ -7,6 +7,9 b' setup'
7 > @command(b'crash', [], b'hg crash')
7 > @command(b'crash', [], b'hg crash')
8 > def crash(ui, *args, **kwargs):
8 > def crash(ui, *args, **kwargs):
9 > raise Exception("oops")
9 > raise Exception("oops")
10 > @command(b'abort', [], b'hg abort')
11 > def abort(ui, *args, **kwargs):
12 > raise error.Abort(b"oops")
10 > EOF
13 > EOF
11 $ abspath=`pwd`/myextension.py
14 $ abspath=`pwd`/myextension.py
12
15
@@ -44,6 +47,14 b' failure exit code'
44 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob)
47 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> add non-existent exited 1 after * seconds (glob)
45 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
48 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox
46
49
50 abort exit code
51 $ rm ./.hg/blackbox.log
52 $ hg abort 2> /dev/null
53 [255]
54 $ hg blackbox -l 2
55 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> abort exited 255 after * seconds (glob)
56 1970/01/01 00:00:00 bob @0000000000000000000000000000000000000000 (5000)> blackbox -l 2
57
47 unhandled exception
58 unhandled exception
48 $ rm ./.hg/blackbox.log
59 $ rm ./.hg/blackbox.log
49 $ hg crash 2> /dev/null
60 $ hg crash 2> /dev/null
General Comments 0
You need to be logged in to leave comments. Login now