comparison mercurial/bundle2.py @ 26792:a84e0cacb2dd

applybundle: set 'bundle2=1' env for all transaction This should be set for all bundle2 application, we enforce that at a low level. This is for courtesy with hooks.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 20 Oct 2015 15:48:24 +0200
parents 28a6c2d72097
children f37de5d44aea
comparison
equal deleted inserted replaced
26791:13b861d1cce9 26792:a84e0cacb2dd
302 to be created""" 302 to be created"""
303 raise TransactionUnavailable() 303 raise TransactionUnavailable()
304 304
305 def applybundle(repo, unbundler, tr, op=None): 305 def applybundle(repo, unbundler, tr, op=None):
306 # transform me into unbundler.apply() as soon as the freeze is lifted 306 # transform me into unbundler.apply() as soon as the freeze is lifted
307 tr.hookargs['bundle2'] = '1'
307 return processbundle(repo, unbundler, lambda: tr, op=op) 308 return processbundle(repo, unbundler, lambda: tr, op=op)
308 309
309 def processbundle(repo, unbundler, transactiongetter=None, op=None): 310 def processbundle(repo, unbundler, transactiongetter=None, op=None):
310 """This function process a bundle, apply effect to/from a repo 311 """This function process a bundle, apply effect to/from a repo
311 312