[Updated] D11860: filemerge: inline `_filemerge()` into `filemerge()`

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Dec 8 08:18:48 UTC 2021


Closed by commit rHGf45a4a47f6a8: filemerge: inline `_filemerge()` into `filemerge()` (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11860?vs=31312&id=31384

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11860/new/

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, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211208/38c30f63/attachment-0002.html>


More information about the Mercurial-patches mailing list