Mercurial > hg
diff hgext/commitextras.py @ 48370:45a073af50a2
errors: use detailed error for invalid commit-extras argument
Differential Revision: https://phab.mercurial-scm.org/D11831
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 22 Nov 2021 17:21:55 -0800 |
parents | 9f70512ae2cf |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/hgext/commitextras.py Fri Nov 19 16:21:00 2021 -0800 +++ b/hgext/commitextras.py Mon Nov 22 17:21:55 2021 -0800 @@ -65,23 +65,23 @@ b"unable to parse '%s', should follow " b"KEY=VALUE format" ) - raise error.Abort(msg % raw) + raise error.InputError(msg % raw) k, v = raw.split(b'=', 1) if not k: msg = _(b"unable to parse '%s', keys can't be empty") - raise error.Abort(msg % raw) + raise error.InputError(msg % raw) if re.search(br'[^\w-]', k): msg = _( b"keys can only contain ascii letters, digits," b" '_' and '-'" ) - raise error.Abort(msg) + raise error.InputError(msg) if k in usedinternally: msg = _( b"key '%s' is used internally, can't be set " b"manually" ) - raise error.Abort(msg % k) + raise error.InputError(msg % k) inneropts['extra'][k] = v return super(repoextra, self).commit(*innerpats, **inneropts)