# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-03-31 09:19:16 # Node ID 9041c91561fcfefa3efbac0225f71b4d2d6604f6 # Parent 7e906d8a825f745671a5bdfb63f1d3cbe7953aea 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 diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -350,7 +350,7 @@ def applybundle(repo, unbundler, tr, sou 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 @@ class partiterator(object): 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