Mercurial > hg
diff tests/test-backout.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 | 976b26bdd0d8 |
children | 5a0b930cfb3e |
line wrap: on
line diff
--- a/tests/test-backout.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-backout.t Tue Oct 06 22:36:15 2020 -0700 @@ -5,10 +5,10 @@ $ hg backout abort: please specify a revision to backout - [255] + [10] $ hg backout -r 0 0 abort: please specify just one revision - [255] + [10] basic operation (this also tests that editor is invoked if the commit message is not @@ -210,7 +210,7 @@ $ hg backout 1 abort: cannot backout change that is not an ancestor - [255] + [10] $ echo c > c $ hg ci -Am2 adding c @@ -227,7 +227,7 @@ $ hg backout 1 abort: cannot backout change that is not an ancestor - [255] + [10] $ hg summary parent: 2:db815d6d32e6 tip 2 @@ -464,19 +464,19 @@ $ hg backout 4 abort: cannot backout a merge changeset - [255] + [10] backout of merge with bad parent should fail $ hg backout --parent 0 4 abort: cb9a9f314b8b is not a parent of b2f3bb92043e - [255] + [10] backout of non-merge with parent should fail $ hg backout --parent 0 3 abort: cannot use --parent on non-merge changeset - [255] + [10] backout with valid parent should be ok @@ -805,7 +805,7 @@ $ hg backout --merge --no-commit 2 abort: cannot specify both --no-commit and --merge - [255] + [10] Ensure that backout out the same changeset twice performs correctly: