diff -r ea84c2b286a2 -r 1243295fcc3a mercurial/dispatch.py --- a/mercurial/dispatch.py Thu Nov 15 13:16:46 2018 -0800 +++ b/mercurial/dispatch.py Fri Nov 16 14:21:47 2018 +0100 @@ -250,9 +250,17 @@ req.ui._blockedtimes['command_duration'] = duration * 1000 req.ui.log('uiblocked', 'ui blocked ms', **pycompat.strkwargs(req.ui._blockedtimes)) - req.ui.log("commandfinish", "%s exited %d after %0.2f seconds\n", - msg, ret & 255, duration, - canonical_command=req.canonical_command) + return_code = ret & 255 + req.ui.log( + "commandfinish", + "%s exited %d after %0.2f seconds\n", + msg, + return_code, + duration, + return_code=return_code, + duration=duration, + canonical_command=req.canonical_command, + ) try: req._runexithandlers() except: # exiting, so no re-raises