comparison mercurial/bundle2.py @ 37237:f7d3915d5b3a

bundleoperation: pass the source argument from all the users We now have a source attribute to the bundle2.bundleoperation class which stores the operation which leads to the current bundling/unbundling. Let's make sure we pass source argument from all the users of the command. Differential Revision: https://phab.mercurial-scm.org/D2995
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 31 Mar 2018 14:51:34 +0530
parents 9041c91561fc
children 684a6a261f30
comparison
equal deleted inserted replaced
37236:9041c91561fc 37237:f7d3915d5b3a
351 if url is not None and 'url' not in tr.hookargs: 351 if url is not None and 'url' not in tr.hookargs:
352 tr.hookargs['url'] = url 352 tr.hookargs['url'] = url
353 return processbundle(repo, unbundler, lambda: tr, source=source) 353 return processbundle(repo, unbundler, lambda: tr, source=source)
354 else: 354 else:
355 # the transactiongetter won't be used, but we might as well set it 355 # the transactiongetter won't be used, but we might as well set it
356 op = bundleoperation(repo, lambda: tr) 356 op = bundleoperation(repo, lambda: tr, source=source)
357 _processchangegroup(op, unbundler, tr, source, url, **kwargs) 357 _processchangegroup(op, unbundler, tr, source, url, **kwargs)
358 return op 358 return op
359 359
360 class partiterator(object): 360 class partiterator(object):
361 def __init__(self, repo, op, unbundler): 361 def __init__(self, repo, op, unbundler):
439 reworked and this ability will probably go away in the process. 439 reworked and this ability will probably go away in the process.
440 """ 440 """
441 if op is None: 441 if op is None:
442 if transactiongetter is None: 442 if transactiongetter is None:
443 transactiongetter = _notransaction 443 transactiongetter = _notransaction
444 op = bundleoperation(repo, transactiongetter) 444 op = bundleoperation(repo, transactiongetter, source=source)
445 # todo: 445 # todo:
446 # - replace this is a init function soon. 446 # - replace this is a init function soon.
447 # - exception catching 447 # - exception catching
448 unbundler.params 448 unbundler.params
449 if repo.ui.debugflag: 449 if repo.ui.debugflag: