Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help.py @ 46261:c9b2a4d69e66
errors: raise InputError when non-existent help section requested
Differential Revision: https://phab.mercurial-scm.org/D9776
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 13 Jan 2021 22:37:21 -0800 |
parents | 89a2afe31e82 |
children | d481f30ea8e3 |
line wrap: on
line diff
--- a/mercurial/help.py Fri Jan 15 12:56:25 2021 -0500 +++ b/mercurial/help.py Wed Jan 13 22:37:21 2021 -0800 @@ -1064,7 +1064,7 @@ if not rst: msg = _(b'no matches') hint = _(b"try 'hg help' for a list of topics") - raise error.Abort(msg, hint=hint) + raise error.InputError(msg, hint=hint) elif name and name != b'shortlist': queries = [] if unknowncmd: @@ -1095,7 +1095,7 @@ hintname = name msg = _(b'no such help topic: %s') % formatname hint = _(b"try 'hg help --keyword %s'") % hintname - raise error.Abort(msg, hint=hint) + raise error.InputError(msg, hint=hint) else: # program name if not ui.quiet: @@ -1155,6 +1155,6 @@ # to look for, or we could have simply failed to found "foo.bar" # because bar isn't a section of foo if section and not (blocks and name): - raise error.Abort(_(b"help section not found: %s") % fullname) + raise error.InputError(_(b"help section not found: %s") % fullname) return minirst.formatplain(blocks, textwidth)