mercurial/dispatch.py
changeset 38064 48853a927757
parent 38038 6f9ac3cb0987
child 38065 c3fd9a0f8277
--- a/mercurial/dispatch.py	Tue May 15 11:52:43 2018 -0700
+++ b/mercurial/dispatch.py	Wed May 16 20:17:50 2018 +0900
@@ -208,7 +208,7 @@
 
     msg = _formatargs(req.args)
     starttime = util.timer()
-    ret = -1
+    ret = 1  # default of Python exit code on unhandled exception
     try:
         ret = _runcatch(req) or 0
     except error.ProgrammingError as inst:
@@ -239,7 +239,7 @@
             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 or 0, duration)
+                   msg, ret, duration)
         try:
             req._runexithandlers()
         except: # exiting, so no re-raises