Mercurial > public > mercurial-scm > hg
diff tests/test-alias.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 | be25b66f86ab |
children | f0e9dda408b3 |
line wrap: on
line diff
--- a/tests/test-alias.t Wed Jan 13 22:37:21 2021 -0800 +++ b/tests/test-alias.t Thu Jan 14 11:53:55 2021 -0800 @@ -468,13 +468,13 @@ $ hg i hg: command 'i' is ambiguous: idalias idaliaslong idaliasshell identify import incoming init - [255] + [10] $ hg id 042423737847 tip $ hg ida hg: command 'ida' is ambiguous: idalias idaliaslong idaliasshell - [255] + [10] $ hg idalias 042423737847 tip $ hg idaliasl @@ -484,7 +484,7 @@ $ hg parentsshell hg: command 'parentsshell' is ambiguous: parentsshell1 parentsshell2 - [255] + [10] $ hg parentsshell1 one $ hg parentsshell2 @@ -533,11 +533,11 @@ $ hg --cwd .. subalias > /dev/null hg: unknown command 'subalias' (did you mean idalias?) - [255] + [10] $ hg -R .. subalias > /dev/null hg: unknown command 'subalias' (did you mean idalias?) - [255] + [10] shell alias defined in other repo @@ -545,7 +545,7 @@ $ hg mainalias > /dev/null hg: unknown command 'mainalias' (did you mean idalias?) - [255] + [10] $ hg -R .. mainalias main $ hg --cwd .. mainalias @@ -555,7 +555,7 @@ $ hg --cwd .. manalias hg: unknown command 'manalias' (did you mean one of idalias, mainalias, manifest?) - [255] + [10] shell aliases with escaped $ chars @@ -593,7 +593,7 @@ $ hg reba hg: command 'reba' is ambiguous: rebase rebate - [255] + [10] $ hg rebat this is rebate $ hg rebat --foo-bar @@ -650,22 +650,22 @@ -T --template TEMPLATE display with template (use 'hg rt -h' to show more help) - [255] + [10] invalid global arguments for normal commands, aliases, and shell aliases $ hg --invalid root hg: option --invalid not recognized (use 'hg help -v' for a list of global options) - [255] + [10] $ hg --invalid mylog hg: option --invalid not recognized (use 'hg help -v' for a list of global options) - [255] + [10] $ hg --invalid blank hg: option --invalid not recognized (use 'hg help -v' for a list of global options) - [255] + [10] environment variable changes in alias commands