##// END OF EJS Templates
bundle2: rename the _canusebundle2 method to _forcebundle1...
Pierre-Yves David -
r29682:2db085d5 default
parent child Browse files
Show More
@@ -257,12 +257,12 b' def buildobsmarkerspart(bundler, markers'
257 return bundler.newpart('obsmarkers', data=stream)
257 return bundler.newpart('obsmarkers', data=stream)
258 return None
258 return None
259
259
260 def _canusebundle2(op):
260 def _forcebundle1(op):
261 """return true if a pull/push can use bundle2
261 """return true if a pull/push must use bundle1
262
262
263 Feel free to nuke this function when we drop the experimental option"""
263 Feel free to nuke this function when we drop the experimental option"""
264 return (op.repo.ui.configbool('experimental', 'bundle2-exp', True)
264 return not (op.repo.ui.configbool('experimental', 'bundle2-exp', True)
265 and op.remote.capable('bundle2'))
265 and op.remote.capable('bundle2'))
266
266
267
267
268 class pushoperation(object):
268 class pushoperation(object):
@@ -417,7 +417,7 b' def push(repo, remote, force=False, revs'
417 # bundle2 push may receive a reply bundle touching bookmarks or other
417 # bundle2 push may receive a reply bundle touching bookmarks or other
418 # things requiring the wlock. Take it now to ensure proper ordering.
418 # things requiring the wlock. Take it now to ensure proper ordering.
419 maypushback = pushop.ui.configbool('experimental', 'bundle2.pushback')
419 maypushback = pushop.ui.configbool('experimental', 'bundle2.pushback')
420 if _canusebundle2(pushop) and maypushback:
420 if (not _forcebundle1(pushop)) and maypushback:
421 localwlock = pushop.repo.wlock()
421 localwlock = pushop.repo.wlock()
422 locallock = pushop.repo.lock()
422 locallock = pushop.repo.lock()
423 pushop.locallocked = True
423 pushop.locallocked = True
@@ -442,7 +442,7 b' def push(repo, remote, force=False, revs'
442 lock = pushop.remote.lock()
442 lock = pushop.remote.lock()
443 try:
443 try:
444 _pushdiscovery(pushop)
444 _pushdiscovery(pushop)
445 if _canusebundle2(pushop):
445 if not _forcebundle1(pushop):
446 _pushbundle2(pushop)
446 _pushbundle2(pushop)
447 _pushchangeset(pushop)
447 _pushchangeset(pushop)
448 _pushsyncphase(pushop)
448 _pushsyncphase(pushop)
@@ -1099,7 +1099,7 b' class pulloperation(object):'
1099
1099
1100 @util.propertycache
1100 @util.propertycache
1101 def canusebundle2(self):
1101 def canusebundle2(self):
1102 return _canusebundle2(self)
1102 return not _forcebundle1(self)
1103
1103
1104 @util.propertycache
1104 @util.propertycache
1105 def remotebundle2caps(self):
1105 def remotebundle2caps(self):
General Comments 0
You need to be logged in to leave comments. Login now