filemerge: add a wrapper around the filemerge function
authorSiddharth Agarwal <sid0@fb.com>
Sun, 11 Oct 2015 12:31:08 -0700
changeset 26605 ef21a2c41629
parent 26604 a3fcc8e3136b
child 26606 2a405d307f8c
filemerge: add a wrapper around the filemerge function We'll introduce a separate premerge function that calls the same code.
hgext/largefiles/uisetup.py
mercurial/filemerge.py
--- a/hgext/largefiles/uisetup.py	Fri Oct 09 01:19:37 2015 +0200
+++ b/hgext/largefiles/uisetup.py	Sun Oct 11 12:31:08 2015 -0700
@@ -102,7 +102,7 @@
                                     overrides.mergerecordupdates)
     entry = extensions.wrapfunction(merge, 'update',
                                     overrides.mergeupdate)
-    entry = extensions.wrapfunction(filemerge, 'filemerge',
+    entry = extensions.wrapfunction(filemerge, '_filemerge',
                                     overrides.overridefilemerge)
     entry = extensions.wrapfunction(cmdutil, 'copy',
                                     overrides.overridecopy)
--- a/mercurial/filemerge.py	Fri Oct 09 01:19:37 2015 +0200
+++ b/mercurial/filemerge.py	Sun Oct 11 12:31:08 2015 -0700
@@ -435,7 +435,7 @@
         newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
     return newlabels
 
-def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+def _filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
     """perform a 3-way merge in the working directory
 
     mynode = parent node before merge
@@ -567,5 +567,8 @@
 
     return r
 
+def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+    return _filemerge(repo, mynode, orig, fcd, fco, fca, labels=labels)
+
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = internals.values()