mercurial/filemerge.py
changeset 26607 45a6233d5f50
parent 26606 2a405d307f8c
child 26608 ae5b60d3294f
--- a/mercurial/filemerge.py	Sun Oct 11 12:56:21 2015 -0700
+++ b/mercurial/filemerge.py	Sun Oct 11 20:47:04 2015 -0700
@@ -435,9 +435,10 @@
         newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
     return newlabels
 
-def _filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+def _filemerge(premerge, repo, mynode, orig, fcd, fco, fca, labels=None):
     """perform a 3-way merge in the working directory
 
+    premerge = whether this is a premerge
     mynode = parent node before merge
     orig = original local filename before merge
     fco = other file context
@@ -515,7 +516,7 @@
         if markerstyle != 'basic':
             labels = _formatlabels(repo, fcd, fco, fca, labels)
 
-        if mergetype == fullmerge:
+        if premerge and mergetype == fullmerge:
             r = _premerge(repo, toolconf, files, labels=labels)
 
         if not r:  # premerge successfully merged the file
@@ -569,8 +570,13 @@
 
     return r
 
+def premerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+    return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels)
+
 def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
-    return _filemerge(repo, mynode, orig, fcd, fco, fca, labels=labels)
+    # 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)
 
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = internals.values()