Mercurial > hg
diff tests/test-help.t @ 46262:9c9e0b4b2ca7
error: use detailed exit code 10 for command errors
Command errors (unknown or ambiguous commands, or bad command
arguments or options) are handled in the `dispatch` module. Most other
errors are handled in the `scmutil` module. This patch therefore has
to duplicate a little bit of code from the `scmutil` module. It's just
a few lines, however, so it seems fine to me. It's a pretty common
category of errors, so it's important to have them respect
`ui.detailed-exit-code`.
Differential Revision: https://phab.mercurial-scm.org/D9777
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 14 Jan 2021 11:53:55 -0800 |
parents | c9b2a4d69e66 |
children | 8b94f05ab069 |
line wrap: on
line diff
--- a/tests/test-help.t Wed Jan 13 22:37:21 2021 -0800 +++ b/tests/test-help.t Thu Jan 14 11:53:55 2021 -0800 @@ -593,7 +593,7 @@ -n --dry-run do not perform actions, just print output (use 'hg add -h' to show more help) - [255] + [10] Test ambiguous command help @@ -763,13 +763,13 @@ $ hg skjdfks hg: unknown command 'skjdfks' (use 'hg help' for a list of commands) - [255] + [10] Typoed command gives suggestion $ hg puls hg: unknown command 'puls' (did you mean one of pull, push?) - [255] + [10] Not enabled extension gets suggested @@ -780,7 +780,7 @@ rebase command to move sets of revisions to a different ancestor (use 'hg help extensions' for information on enabling extensions) - [255] + [10] Disabled extension gets suggested $ hg --config extensions.rebase=! rebase @@ -790,7 +790,7 @@ rebase command to move sets of revisions to a different ancestor (use 'hg help extensions' for information on enabling extensions) - [255] + [10] Checking that help adapts based on the config: @@ -804,16 +804,16 @@ $ hg .log hg: unknown command '.log' (did you mean log?) - [255] + [10] $ hg log. hg: unknown command 'log.' (did you mean log?) - [255] + [10] $ hg pu.lh hg: unknown command 'pu.lh' (did you mean one of pull, push?) - [255] + [10] $ cat > helpext.py <<EOF > import os