Mercurial > hg
diff tests/test-commit-interactive.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 | ebf353aa4385 |
children | 96ca817ec192 |
line wrap: on
line diff
--- a/tests/test-commit-interactive.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-commit-interactive.t Tue Oct 06 22:36:15 2020 -0700 @@ -20,14 +20,14 @@ [255] $ hg commit -i --config ui.interactive=false abort: running non-interactively - [255] + [10] $ hg commit -i empty-rw<<EOF > n > EOF diff --git a/empty-rw b/empty-rw new file mode 100644 abort: empty commit message - [255] + [10] $ hg tip -p changeset: -1:000000000000 @@ -46,7 +46,7 @@ diff --git a/empty-rw b/empty-rw new file mode 100644 abort: empty commit message - [255] + [10] $ hg tip -p changeset: -1:000000000000 @@ -1350,7 +1350,7 @@ $ hg commit -i -m'will abort' abort: cannot partially commit a merge (use "hg commit" instead) - [255] + [10] $ hg up -C 0 files updated, 0 files merged, 1 files removed, 0 files unresolved @@ -1494,7 +1494,7 @@ Hunk #1 FAILED at 0 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej abort: patch failed to apply - [255] + [10] $ cat editedfile This change will not be committed This is the second line @@ -1540,7 +1540,7 @@ (enter ? for help) [Ynesfdaq?] e abort: error parsing patch: unhandled transition: range -> range - [255] + [10] Exiting editor with status 1, ignores the edit but does not stop the recording session @@ -1600,7 +1600,7 @@ (enter ? for help) [Ynesfdaq?] e abort: error parsing patch: unhandled transition: file -> other - [255] + [10] $ hg up -C 1 files updated, 0 files merged, 0 files removed, 0 files unresolved