changeset 26605:ef21a2c41629

filemerge: add a wrapper around the filemerge function We'll introduce a separate premerge function that calls the same code.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 11 Oct 2015 12:31:08 -0700
parents a3fcc8e3136b
children 2a405d307f8c
files hgext/largefiles/uisetup.py mercurial/filemerge.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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()