merge: allow user to halt merge on merge-tool failures
authorRyan McElroy <rmcelroy@fb.com>
Fri, 06 Oct 2017 06:48:43 -0700
changeset 34797 284fa44f7f39
parent 34796 ed91846c29cf
child 34798 e33381d95930
merge: allow user to halt merge on merge-tool failures Depends on D932. Call the new _onfilemergefailure function when a merge tool reports failure via a return code. Differential Revision: https://phab.mercurial-scm.org/D951
mercurial/filemerge.py
tests/test-merge-halt.t
--- a/mercurial/filemerge.py	Fri Oct 06 06:48:43 2017 -0700
+++ b/mercurial/filemerge.py	Fri Oct 06 06:48:43 2017 -0700
@@ -739,6 +739,7 @@
         if r:
             if onfailure:
                 ui.warn(onfailure % fd)
+            _onfilemergefailure(ui)
 
         return True, r, deleted
     finally:
--- a/tests/test-merge-halt.t	Fri Oct 06 06:48:43 2017 -0700
+++ b/tests/test-merge-halt.t	Fri Oct 06 06:48:43 2017 -0700
@@ -44,8 +44,7 @@
   merging a
   merging b
   merging a failed!
-  merging b failed!
-  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  merge halted after failed merge (see hg resolve)
   [1]
 
   $ hg resolve --list
@@ -65,8 +64,10 @@
   merging a
   merging b
   merging a failed!
+  continue merge operation (yn)? y
   merging b failed!
-  unresolved conflicts (see hg resolve, then hg rebase --continue)
+  continue merge operation (yn)? n
+  merge halted after failed merge (see hg resolve)
   [1]
 
   $ hg resolve --list