Patchwork D11860: filemerge: inline `_filemerge()` into `filemerge()`

login
register
mail settings
Submitter phabricator
Date Dec. 4, 2021, 7:07 a.m.
Message ID <differential-rev-PHID-DREV-evekuyhjnbmo6ia5f3o6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50184/
State Superseded
Headers show

Comments

phabricator - Dec. 4, 2021, 7:07 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The caller is now trivial, so the indirection is pointless.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11860

AFFECTED FILES
  hgext/largefiles/overrides.py
  mercurial/filemerge.py
  tests/failfilemerge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/failfilemerge.py b/tests/failfilemerge.py
--- a/tests/failfilemerge.py
+++ b/tests/failfilemerge.py
@@ -14,4 +14,4 @@ 
 
 
 def extsetup(ui):
-    extensions.wrapfunction(filemerge, '_filemerge', failfilemerge)
+    extensions.wrapfunction(filemerge, 'filemerge', failfilemerge)
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -1027,7 +1027,7 @@ 
                 util.unlink(d)
 
 
-def _filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None):
+def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None):
     """perform a 3-way merge in the working directory
 
     premerge = whether this is a premerge
@@ -1277,10 +1277,6 @@ 
     return repo.wjoin(ctx.path())
 
 
-def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None):
-    return _filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=labels)
-
-
 def loadinternalmerge(ui, extname, registrarobj):
     """Load internal merge tool from specified registrarobj"""
     for name, func in pycompat.iteritems(registrarobj._table):
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -666,7 +666,7 @@ 
 
 # Override filemerge to prompt the user about how they wish to merge
 # largefiles. This will handle identical edits without prompting the user.
-@eh.wrapfunction(filemerge, b'_filemerge')
+@eh.wrapfunction(filemerge, b'filemerge')
 def overridefilemerge(
     origfn, repo, wctx, mynode, orig, fcd, fco, fca, labels=None
 ):