comparison mercurial/scmutil.py @ 45895:fc4fb2f17dd4

errors: use exit code 10 for parse errors Now that `ParseError`s raised while reading the config file has been converted into `ConfigError`s, the remaining parse errors should all be "input errors" (i.e. exit code 10), according to https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9332
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 16 Nov 2020 16:00:50 -0800
parents 600aec73f309
children 95c4cca641f6
comparison
equal deleted inserted replaced
45894:9dc1351d0b5f 45895:fc4fb2f17dd4
220 detailed_exit_code = 240 220 detailed_exit_code = 240
221 coarse_exit_code = 1 221 coarse_exit_code = 1
222 except error.WdirUnsupported: 222 except error.WdirUnsupported:
223 ui.error(_(b"abort: working directory revision cannot be specified\n")) 223 ui.error(_(b"abort: working directory revision cannot be specified\n"))
224 except error.Abort as inst: 224 except error.Abort as inst:
225 if isinstance(inst, error.InputError): 225 if isinstance(inst, (error.InputError, error.ParseError)):
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): 229 elif isinstance(inst, error.ConfigError):
230 detailed_exit_code = 30 230 detailed_exit_code = 30