D9392: errors: raise StateError when there are unresolves merge conflicts

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Nov 24 18:07:55 UTC 2020


martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9392

AFFECTED FILES
  mercurial/mergeutil.py
  tests/test-commit-amend.t
  tests/test-commit-unresolved.t
  tests/test-graft.t
  tests/test-rebase-conflicts.t
  tests/test-update-branches.t

CHANGE DETAILS

diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -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
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -89,7 +89,7 @@
 
   $ hg rebase --continue
   abort: unresolved merge conflicts (see 'hg help resolve')
-  [255]
+  [20]
 
 Conclude rebase:
 
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -324,7 +324,7 @@
   $ hg graft -c
   grafting 4:9c233e8e184d "4"
   abort: unresolved merge conflicts (see 'hg help resolve')
-  [255]
+  [20]
 
 Fix up:
 
diff --git a/tests/test-commit-unresolved.t b/tests/test-commit-unresolved.t
--- a/tests/test-commit-unresolved.t
+++ b/tests/test-commit-unresolved.t
@@ -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)
diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
--- a/tests/test-commit-amend.t
+++ b/tests/test-commit-amend.t
@@ -423,7 +423,7 @@
 
   $ hg ci --amend
   abort: unresolved merge conflicts (see 'hg help resolve')
-  [255]
+  [20]
 
   $ hg up -qC .
 
diff --git a/mercurial/mergeutil.py b/mercurial/mergeutil.py
--- a/mercurial/mergeutil.py
+++ b/mercurial/mergeutil.py
@@ -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')")
         )



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list