##// END OF EJS Templates
exchange: standalone function to determine if bundle2 is requested...
Gregory Szorc -
r27244:709977a4 default
parent child Browse files
Show More
@@ -1421,6 +1421,11 b' def getbundle2partsgenerator(stepname, i'
1421 1421 return func
1422 1422 return dec
1423 1423
1424 def bundle2requested(bundlecaps):
1425 if bundlecaps is not None:
1426 return any(cap.startswith('HG2') for cap in bundlecaps)
1427 return False
1428
1424 1429 def getbundle(repo, source, heads=None, common=None, bundlecaps=None,
1425 1430 **kwargs):
1426 1431 """return a full bundle (with potentially multiple kind of parts)
@@ -1436,10 +1441,8 b' def getbundle(repo, source, heads=None, '
1436 1441 The implementation is at a very early stage and will get massive rework
1437 1442 when the API of bundle is refined.
1438 1443 """
1444 usebundle2 = bundle2requested(bundlecaps)
1439 1445 # bundle10 case
1440 usebundle2 = False
1441 if bundlecaps is not None:
1442 usebundle2 = any((cap.startswith('HG2') for cap in bundlecaps))
1443 1446 if not usebundle2:
1444 1447 if bundlecaps and not kwargs.get('cg', True):
1445 1448 raise ValueError(_('request for bundle10 must include changegroup'))
General Comments 0
You need to be logged in to leave comments. Login now