diff mercurial/scmutil.py @ 45858:ebee234d952a

errors: set detailed exit code to 100 for some remote errors This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9309
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 22 Oct 2020 13:31:34 -0700
parents ae00e170f2d1
children 527ce85c2e60
line wrap: on
line diff
--- a/mercurial/scmutil.py	Thu Nov 12 21:56:52 2020 -0800
+++ b/mercurial/scmutil.py	Thu Oct 22 13:31:34 2020 -0700
@@ -182,6 +182,7 @@
             )
         )
     except error.OutOfBandError as inst:
+        detailed_exit_code = 100
         if inst.args:
             msg = _(b"abort: remote error:\n")
         else:
@@ -237,8 +238,10 @@
         elif m in b"zlib".split():
             ui.error(_(b"(is your Python install correct?)\n"))
     except util.urlerr.httperror as inst:
+        detailed_exit_code = 100
         ui.error(_(b"abort: %s\n") % stringutil.forcebytestr(inst))
     except util.urlerr.urlerror as inst:
+        detailed_exit_code = 100
         try:  # usually it is in the form (errno, strerror)
             reason = inst.reason.args[1]
         except (AttributeError, IndexError):