# HG changeset patch # User Martin von Zweigbergk # Date 2020-11-24 00:48:13 # Node ID fa87536d3d70e768e7d2a52723bf0fad9965243d # Parent 8f50dc096cf4fc25d510e0e6f503781e6057aa04 errors: raise StateError when there are unresolves merge conflicts Differential Revision: https://phab.mercurial-scm.org/D9392 diff --git a/mercurial/mergeutil.py b/mercurial/mergeutil.py --- a/mercurial/mergeutil.py +++ b/mercurial/mergeutil.py @@ -14,6 +14,6 @@ from . import error def checkunresolved(ms): if list(ms.unresolved()): - raise error.Abort( + raise error.StateError( _(b"unresolved merge conflicts (see 'hg help resolve')") ) 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 @@ Refuse to amend if there is a merge conf $ hg ci --amend abort: unresolved merge conflicts (see 'hg help resolve') - [255] + [20] $ hg up -qC . 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 @@ Correct the conflict without marking the $ 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 @@ Test that if a file is removed but not m $ 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-graft.t b/tests/test-graft.t --- a/tests/test-graft.t +++ b/tests/test-graft.t @@ -324,7 +324,7 @@ Continue without resolve should fail: $ hg graft -c grafting 4:9c233e8e184d "4" abort: unresolved merge conflicts (see 'hg help resolve') - [255] + [20] Fix up: 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 @@ Try to continue without solving the conf $ hg rebase --continue abort: unresolved merge conflicts (see 'hg help resolve') - [255] + [20] Conclude rebase: 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 @@ Try to make empty commit while there are $ 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