# HG changeset patch # User Martin von Zweigbergk # Date 2021-05-19 04:45:59 # Node ID 7a769ac496375cb640dc8fab8f8b974448855c20 # Parent 5a75be9163165691e1c370d2e34a066d28ab2941 errors: catch the new Error class in scmutil and chgserver Differential Revision: https://phab.mercurial-scm.org/D10739 diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py --- a/mercurial/chgserver.py +++ b/mercurial/chgserver.py @@ -515,7 +515,7 @@ class chgcmdserver(commandserver.server) if inst.hint: self.ui.error(_(b"(%s)\n") % inst.hint) errorraised = True - except error.Abort as inst: + except error.Error as inst: if inst.detailed_exit_code is not None: detailed_exit_code = inst.detailed_exit_code self.ui.error(inst.format()) diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -205,7 +205,7 @@ def callcatch(ui, func): detailed_exit_code = 50 except error.WdirUnsupported: ui.error(_(b"abort: working directory revision cannot be specified\n")) - except error.Abort as inst: + except error.Error as inst: if inst.detailed_exit_code is not None: detailed_exit_code = inst.detailed_exit_code if inst.coarse_exit_code is not None: