comparison mercurial/bundle2.py @ 33035:6e3a6774d998

bundle: remove 'op' argument from applybundle() No callers pass in an operation.
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 21 Jun 2017 14:42:04 -0700
parents e8c8d81eb864
children 52c7060b707a
comparison
equal deleted inserted replaced
33034:181ca34883e6 33035:6e3a6774d998
308 308
309 Raise an exception to highlight the fact that no transaction was expected 309 Raise an exception to highlight the fact that no transaction was expected
310 to be created""" 310 to be created"""
311 raise TransactionUnavailable() 311 raise TransactionUnavailable()
312 312
313 def applybundle(repo, unbundler, tr, source=None, url=None, op=None): 313 def applybundle(repo, unbundler, tr, source=None, url=None):
314 # transform me into unbundler.apply() as soon as the freeze is lifted 314 # transform me into unbundler.apply() as soon as the freeze is lifted
315 tr.hookargs['bundle2'] = '1' 315 tr.hookargs['bundle2'] = '1'
316 if source is not None and 'source' not in tr.hookargs: 316 if source is not None and 'source' not in tr.hookargs:
317 tr.hookargs['source'] = source 317 tr.hookargs['source'] = source
318 if url is not None and 'url' not in tr.hookargs: 318 if url is not None and 'url' not in tr.hookargs:
319 tr.hookargs['url'] = url 319 tr.hookargs['url'] = url
320 return processbundle(repo, unbundler, lambda: tr, op=op) 320 return processbundle(repo, unbundler, lambda: tr)
321 321
322 def processbundle(repo, unbundler, transactiongetter=None, op=None): 322 def processbundle(repo, unbundler, transactiongetter=None, op=None):
323 """This function process a bundle, apply effect to/from a repo 323 """This function process a bundle, apply effect to/from a repo
324 324
325 It iterates over each part then searches for and uses the proper handling 325 It iterates over each part then searches for and uses the proper handling