Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmutil.py @ 45892:ac362d5a7893
errors: introduce CanceledError and use it in a few places
This very similar to earlier patches (e.g. for `InputError`) and part
of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9339
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 14:14:59 -0700 |
parents | 4b4160a83303 |
children | 7a273336d3d3 |
line wrap: on
line diff
--- a/mercurial/scmutil.py Tue Nov 17 15:51:09 2020 -0800 +++ b/mercurial/scmutil.py Thu Oct 22 14:14:59 2020 -0700 @@ -261,6 +261,8 @@ detailed_exit_code = 20 elif isinstance(inst, error.ConfigError): detailed_exit_code = 30 + elif isinstance(inst, error.CanceledError): + detailed_exit_code = 250 ui.error(_(b"abort: %s\n") % inst.message) if inst.hint: ui.error(_(b"(%s)\n") % inst.hint)