D6755: merge: hint about using `hg resolve` for resolving conflicts

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Aug 21 16:21:02 EDT 2019


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

REVISION SUMMARY
  This was suggested by one of our users at Google. Makes sense to me.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/merge.py
  tests/test-rebase-inmemory.t
  tests/test-resolve.t

CHANGE DETAILS

diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -210,12 +210,15 @@
   [1]
   $ hg up 0
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg merge 2
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg merge --force 2
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
 
 set up conflict-free merge
diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -506,6 +506,7 @@
   $ hg rebase -s 2 -d 7
   rebasing 2:177f92b77385 "c"
   abort: outstanding merge conflicts
+  (use 'hg resolve' to resolve)
   [255]
   $ hg resolve -l
   U e
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2025,7 +2025,8 @@
                 raise error.Abort(_("outstanding uncommitted merge"))
             ms = mergestate.read(repo)
             if list(ms.unresolved()):
-                raise error.Abort(_("outstanding merge conflicts"))
+                raise error.Abort(_("outstanding merge conflicts"),
+                                  hint=_("use 'hg resolve' to resolve"))
         if branchmerge:
             if pas == [p2]:
                 raise error.Abort(_("merging with a working directory ancestor"



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


More information about the Mercurial-devel mailing list