[Request] [+ ] D11860: filemerge: inline `_filemerge()` into `filemerge()`
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Dec 4 07:07:45 UTC 2021
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
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.
- at eh.wrapfunction(filemerge, b'_filemerge')
+ at eh.wrapfunction(filemerge, b'filemerge')
def overridefilemerge(
origfn, repo, wctx, mynode, orig, fcd, fco, fca, labels=None
):
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20211204/dc561113/attachment.html>
More information about the Mercurial-patches
mailing list