Mercurial > hg
diff tests/test-branches.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 | 2e1d9414ff71 |
children | f96fa4de5055 |
line wrap: on
line diff
--- a/tests/test-branches.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-branches.t Tue Oct 06 22:36:15 2020 -0700 @@ -75,12 +75,12 @@ $ hg branch 'b ' abort: a branch of the same name already exists (use 'hg update' to switch to it) - [255] + [10] $ hg branch ' b' abort: a branch of the same name already exists (use 'hg update' to switch to it) - [255] + [10] verify update will accept invalid legacy branch names @@ -281,7 +281,7 @@ $ hg commit -d '9 0' --close-branch -m 'close this part branch too' $ hg commit -d '9 0' --close-branch -m 're-closing this branch' abort: current revision is already a branch closing head - [255] + [10] $ hg log -r tip --debug changeset: 12:e3d49c0575d8fc2cb1cd6859c747c14f5f6d499f @@ -959,7 +959,7 @@ $ hg ci -m "closing branch" --close-branch abort: can only close branch heads (use --force-close-branch to close branch from a non-head changeset) - [255] + [10] $ hg up 0 0 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -984,7 +984,7 @@ $ hg ci -m "branch closed" --close-branch abort: can only close branch heads (use --force-close-branch to close branch from a non-head changeset) - [255] + [10] $ hg ci -m "branch closed" --force-close-branch created new head