Mercurial > public > mercurial-scm > hg
diff tests/test-commit-amend.t @ 45827:8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
This patch introduces a `InputError` class and replaces many uses of
`error.Abort` by it in `commands` and `cmdutil`. This is a part of
https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There will
later be a different class for state errors (to raise e.g. when
there's an unfinished operation). It's not always clear when one
should report an input error and when it should be a state error. We
can always adjust later if I got something wrong in this patch (but
feel free to point out any you notice now).
Differential Revision: https://phab.mercurial-scm.org/D9167
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 06 Oct 2020 22:36:15 -0700 |
parents | 99ebde4fec99 |
children | b4694ef45db5 |
line wrap: on
line diff
--- a/tests/test-commit-amend.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-commit-amend.t Tue Oct 06 22:36:15 2020 -0700 @@ -83,7 +83,7 @@ phases: 2 draft $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend abort: empty commit message - [255] + [10] $ hg summary parent: 1:43f1ba15f28a tip amend base1 @@ -350,7 +350,7 @@ $ echo a >> a $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend abort: empty commit message - [255] + [10] $ hg book book1 1:a3b65065808c * book2 1:a3b65065808c @@ -884,7 +884,7 @@ $ hg ci -m.. $ hg ci --amend --close-branch -m 'closing' abort: can only close branch heads - [255] + [10] This silliness fails: @@ -893,7 +893,7 @@ $ echo b >> b $ hg ci --close-branch -m'open and close' abort: branch "silliness" has no heads to close - [255] + [10] Test that amend with --secret creates new secret changeset forcibly ---------------------------------------------------------------------