changeset 37238:9041c91561fc

bunlde2: add 'source' as an optional argument to processbundle() This will help us to pass the source variable to bundleoperation class. Differential Revision: https://phab.mercurial-scm.org/D2994
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 31 Mar 2018 14:49:16 +0530
parents 7e906d8a825f
children f7d3915d5b3a
files mercurial/bundle2.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bundle2.py	Sat Mar 31 14:47:43 2018 +0530
+++ b/mercurial/bundle2.py	Sat Mar 31 14:49:16 2018 +0530
@@ -350,7 +350,7 @@
             tr.hookargs['source'] = source
         if url is not None and 'url' not in tr.hookargs:
             tr.hookargs['url'] = url
-        return processbundle(repo, unbundler, lambda: tr)
+        return processbundle(repo, unbundler, lambda: tr, source=source)
     else:
         # the transactiongetter won't be used, but we might as well set it
         op = bundleoperation(repo, lambda: tr)
@@ -425,7 +425,7 @@
         self.repo.ui.debug('bundle2-input-bundle: %i parts total\n' %
                            self.count)
 
-def processbundle(repo, unbundler, transactiongetter=None, op=None):
+def processbundle(repo, unbundler, transactiongetter=None, op=None, source=''):
     """This function process a bundle, apply effect to/from a repo
 
     It iterates over each part then searches for and uses the proper handling