# HG changeset patch # User Siddharth Agarwal # Date 2015-10-11 19:31:08 # Node ID ef21a2c41629525048cb9c27d345aeaa55f8a823 # Parent a3fcc8e3136bd19012d28b863d6bf4429948c573 filemerge: add a wrapper around the filemerge function We'll introduce a separate premerge function that calls the same code. diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py --- a/hgext/largefiles/uisetup.py +++ b/hgext/largefiles/uisetup.py @@ -102,7 +102,7 @@ def uisetup(ui): 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) diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -435,7 +435,7 @@ def _formatlabels(repo, fcd, fco, fca, l 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 @@ def _check(r, ui, tool, fcd, files): 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()