D953: merge: use filemerge failure handler in post-filemerge checks checks

2017-10-06 Thread ryanmce (Ryan McElroy)
ryanmce abandoned this revision.
ryanmce added a comment.


  It turns out this isn't needed -- setting the return to 1 means we catch the 
failure in the generic handler I added earlier. I fixed up the tests in the 
previous patch to include the important test changes from here (ie, more 
testing of the prompt stuff).

REPOSITORY
  rHG Mercurial

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

To: ryanmce, #hg-reviewers, mbthomas
Cc: mbthomas, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D953: merge: use filemerge failure handler in post-filemerge checks checks

2017-10-06 Thread mbthomas (Mark Thomas)
mbthomas accepted this revision.
mbthomas added a comment.


  Stack all looks good to me.

REPOSITORY
  rHG Mercurial

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

To: ryanmce, #hg-reviewers, mbthomas
Cc: mbthomas, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D953: merge: use filemerge failure handler in post-filemerge checks checks

2017-10-05 Thread ryanmce (Ryan McElroy)
ryanmce created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Depends on https://phab.mercurial-scm.org/D952.
  
  This allows the user to halt the merge if conflict markers or no changes are
  found in the merged file as well.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/filemerge.py
  tests/test-merge-halt.t

CHANGE DETAILS

diff --git a/tests/test-merge-halt.t b/tests/test-merge-halt.t
--- a/tests/test-merge-halt.t
+++ b/tests/test-merge-halt.t
@@ -85,7 +85,6 @@
   merging b
output file a appears unchanged
   was merge successful (yn)? n
-  merging a failed!
   merge halted after failed merge (see hg resolve)
   [1]
 
@@ -118,20 +117,24 @@
   merging a
   merging b
   was merge of 'a' successful (yn)? n
-  merging a failed!
   merge halted after failed merge (see hg resolve)
   [1]
   $ hg rebase --abort
   rebase aborted
 
 Check that a requested abort actually works
+  $ cat <> $HGRCPATH
+  > [merge]
+  > onfailure=prompt
+  > EOS
   $ cat < n
   > EOS
   rebasing 1:1f28a51c3c9b "c"
   merging a
   merging b
   merging a failed!
+  continue merge operation (yn)? n
   merge halted after failed merge (see hg resolve)
   [1]
 
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -753,6 +753,7 @@
 if ui.promptchoice(_("was merge of '%s' successful (yn)?"
  "$$  $$ ") % fd, 1):
 r = 1
+_onfilemergefailure(ui)
 
 if not r and not checked and (_toolbool(ui, tool, "checkchanged") or
   'changed' in
@@ -762,6 +763,7 @@
  "was merge successful (yn)?"
  "$$  $$ ") % fd, 1):
 r = 1
+_onfilemergefailure(ui)
 
 if back is not None and _toolbool(ui, tool, "fixeol"):
 _matcheol(_workingpath(repo, fcd), back)



To: ryanmce, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel