Mercurial > public > mercurial-scm > hg
diff tests/test-import.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 | d1cabce5ef05 |
children | 2eb8ad899fa6 |
line wrap: on
line diff
--- a/tests/test-import.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-import.t Tue Oct 06 22:36:15 2020 -0700 @@ -14,7 +14,7 @@ $ hg --cwd a import abort: need at least one patch to import - [255] + [10] generate patches for the test @@ -127,7 +127,7 @@ HG: branch 'default' HG: changed a abort: empty commit message - [255] + [10] Test avoiding editor invocation at applying the patch with --exact, even if commit message is empty @@ -374,7 +374,7 @@ $ egrep -v '^(Subject|email)' msg.patch | hg --cwd b import - applying patch from stdin abort: empty commit message - [255] + [10] $ rm -r b @@ -445,7 +445,7 @@ $ hg clone -r0 a b -q $ hg --cwd b import --no-commit --secret ../exported-tip.patch abort: cannot specify both --no-commit and --secret - [255] + [10] $ hg --cwd b import --secret ../exported-tip.patch applying ../exported-tip.patch $ hg --cwd b diff -c . --nodates @@ -1172,7 +1172,7 @@ transaction abort! rollback completed abort: empty.patch: no diffs found - [255] + [10] $ hg tip --template '{rev} {desc|firstline}\n' 0 commit $ hg -q status