Mercurial > public > mercurial-scm > hg-stable
diff tests/test-import-bypass.t @ 45846: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 | 6a454e7053a1 |
line wrap: on
line diff
--- a/tests/test-import-bypass.t Wed Oct 21 19:00:16 2020 -0700 +++ b/tests/test-import-bypass.t Tue Oct 06 22:36:15 2020 -0700 @@ -27,7 +27,7 @@ $ hg import --bypass --exact --edit ../test.diff abort: cannot specify both --exact and --edit - [255] + [10] $ hg import --bypass --exact ../test.diff applying ../test.diff $ shortlog @@ -189,13 +189,13 @@ $ hg import --bypass --no-commit ../test.diff abort: cannot specify both --no-commit and --bypass - [255] + [10] $ hg import --bypass --similarity 50 ../test.diff abort: cannot use --similarity with --bypass - [255] + [10] $ hg import --exact --prefix dir/ ../test.diff abort: cannot specify both --exact and --prefix - [255] + [10] Test commit editor (this also tests that editor is invoked, if the patch doesn't contain @@ -221,7 +221,7 @@ HG: branch 'default' HG: changed a abort: empty commit message - [255] + [10] Test patch.eol is handled (this also tests that editor is not invoked for '--bypass', if the