Mercurial > hg
comparison mercurial/scmutil.py @ 45841:bff719525815
errors: set detailed exit code to 30 for config errors
This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan.
Differential Revision: https://phab.mercurial-scm.org/D9311
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Oct 2020 13:56:01 -0700 |
parents | 527ce85c2e60 |
children | 3175b0e0058b |
comparison
equal
deleted
inserted
replaced
45840:527ce85c2e60 | 45841:bff719525815 |
---|---|
224 except error.Abort as inst: | 224 except error.Abort as inst: |
225 if isinstance(inst, error.InputError): | 225 if isinstance(inst, error.InputError): |
226 detailed_exit_code = 10 | 226 detailed_exit_code = 10 |
227 elif isinstance(inst, error.StateError): | 227 elif isinstance(inst, error.StateError): |
228 detailed_exit_code = 20 | 228 detailed_exit_code = 20 |
229 elif isinstance(inst, error.ConfigError): | |
230 detailed_exit_code = 30 | |
229 ui.error(_(b"abort: %s\n") % inst.message) | 231 ui.error(_(b"abort: %s\n") % inst.message) |
230 if inst.hint: | 232 if inst.hint: |
231 ui.error(_(b"(%s)\n") % inst.hint) | 233 ui.error(_(b"(%s)\n") % inst.hint) |
232 except error.WorkerError as inst: | 234 except error.WorkerError as inst: |
233 # Don't print a message -- the worker already should have | 235 # Don't print a message -- the worker already should have |