diff mercurial/filemerge.py @ 26611:a5ff66e6d77a

filemerge: break overall filemerge into separate premerge and merge steps This means that in ms.resolve we must call merge after calling premerge. This doesn't yet mean that all premerges happen before any merges -- however, this does get us closer to our goal. The output differences are because we recompute the merge tool. The only user-visible difference caused by this patch is that if the tool is missing we'll print the warning twice. Not a huge deal, though.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 11 Oct 2015 20:47:14 -0700
parents f9f82c444ff7
children abb5ec3eb6ce
line wrap: on
line diff
--- a/mercurial/filemerge.py	Sun Oct 11 20:04:40 2015 -0700
+++ b/mercurial/filemerge.py	Sun Oct 11 20:47:14 2015 -0700
@@ -519,6 +519,8 @@
 
         if premerge and mergetype == fullmerge:
             r = _premerge(repo, toolconf, files, labels=labels)
+            # complete if premerge successful (r is 0)
+            return not r, r
 
         if not r:  # premerge successfully merged the file
             needcheck = False
@@ -575,9 +577,7 @@
     return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels)
 
 def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
-    # premerge = True is temporary -- will be changed to False once premerge
-    # function above is ready
-    return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels)
+    return _filemerge(False, repo, mynode, orig, fcd, fco, fca, labels=labels)
 
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = internals.values()