errors: raise StateError when there are unresolves merge conflicts
Differential Revision: https://phab.mercurial-scm.org/D9392
--- a/mercurial/mergeutil.py Mon Nov 23 16:20:02 2020 -0800
+++ b/mercurial/mergeutil.py Mon Nov 23 16:48:13 2020 -0800
@@ -14,6 +14,6 @@
def checkunresolved(ms):
if list(ms.unresolved()):
- raise error.Abort(
+ raise error.StateError(
_(b"unresolved merge conflicts (see 'hg help resolve')")
)
--- a/tests/test-commit-amend.t Mon Nov 23 16:20:02 2020 -0800
+++ b/tests/test-commit-amend.t Mon Nov 23 16:48:13 2020 -0800
@@ -423,7 +423,7 @@
$ hg ci --amend
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
$ hg up -qC .
--- a/tests/test-commit-unresolved.t Mon Nov 23 16:20:02 2020 -0800
+++ b/tests/test-commit-unresolved.t Mon Nov 23 16:48:13 2020 -0800
@@ -101,7 +101,7 @@
$ echo "ABCD" > A
$ hg commit -m "Merged"
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
Mark the conflict as resolved and commit
@@ -123,7 +123,7 @@
$ hg rm --force A
$ hg commit -m merged
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
$ hg resolve -ma
(no more unresolved files)
--- a/tests/test-graft.t Mon Nov 23 16:20:02 2020 -0800
+++ b/tests/test-graft.t Mon Nov 23 16:48:13 2020 -0800
@@ -324,7 +324,7 @@
$ hg graft -c
grafting 4:9c233e8e184d "4"
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
Fix up:
--- a/tests/test-rebase-conflicts.t Mon Nov 23 16:20:02 2020 -0800
+++ b/tests/test-rebase-conflicts.t Mon Nov 23 16:48:13 2020 -0800
@@ -89,7 +89,7 @@
$ hg rebase --continue
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
Conclude rebase:
--- a/tests/test-update-branches.t Mon Nov 23 16:20:02 2020 -0800
+++ b/tests/test-update-branches.t Mon Nov 23 16:48:13 2020 -0800
@@ -348,7 +348,7 @@
$ rm a.orig
$ hg ci -m empty
abort: unresolved merge conflicts (see 'hg help resolve')
- [255]
+ [20]
$ hg resolve -m a
(no more unresolved files)
$ hg resolve -l