changeset 33044:1d2b68952950

bundle: inline applybundle1() We have now gotten rid of all but one caller, so let's inline it there.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 22 Jun 2017 21:45:32 -0700
parents 18c2489ac96d
children 99c6c9fa9e6d
files mercurial/bundle2.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Thu Jun 22 15:00:19 2017 -0700
+++ b/mercurial/bundle2.py	Thu Jun 22 21:45:32 2017 -0700
@@ -310,12 +310,6 @@
     to be created"""
     raise TransactionUnavailable()
 
-def applybundle1(repo, cg, tr, source, url, **kwargs):
-    # the transactiongetter won't be used, but we might as well set it
-    op = bundleoperation(repo, lambda: tr)
-    _processchangegroup(op, cg, tr, source, url, **kwargs)
-    return op
-
 def applybundle(repo, unbundler, tr, source=None, url=None, **kwargs):
     # transform me into unbundler.apply() as soon as the freeze is lifted
     if isinstance(unbundler, unbundle20):
@@ -326,7 +320,10 @@
             tr.hookargs['url'] = url
         return processbundle(repo, unbundler, lambda: tr)
     else:
-        return applybundle1(repo, unbundler, tr, source, url, **kwargs)
+        # the transactiongetter won't be used, but we might as well set it
+        op = bundleoperation(repo, lambda: tr)
+        _processchangegroup(op, unbundler, tr, source, url, **kwargs)
+        return op
 
 def processbundle(repo, unbundler, transactiongetter=None, op=None):
     """This function process a bundle, apply effect to/from a repo