changeset 45916:fa87536d3d70

errors: raise StateError when there are unresolves merge conflicts Differential Revision: https://phab.mercurial-scm.org/D9392
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 23 Nov 2020 16:48:13 -0800
parents 8f50dc096cf4
children 721f765a34ac
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
diffstat 6 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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