##// END OF EJS Templates
incoming: request a bundle2 when possible (BC)...
Pierre-Yves David -
r26544:1e8e0b01 default
parent child Browse files
Show More
@@ -455,7 +455,19 b' def getremotechanges(ui, repo, other, on'
455 if bundlename or not localrepo:
455 if bundlename or not localrepo:
456 # create a bundle (uncompressed if other repo is not local)
456 # create a bundle (uncompressed if other repo is not local)
457
457
458 if True:
458 canbundle2 = (ui.configbool('experimental', 'bundle2-exp', True)
459 and other.capable('getbundle')
460 and other.capable('bundle2'))
461 if canbundle2:
462 kwargs = {}
463 kwargs['common'] = common
464 kwargs['heads'] = rheads
465 kwargs['bundlecaps'] = exchange.caps20to10(repo)
466 kwargs['cg'] = True
467 b2 = other.getbundle('incoming', **kwargs)
468 fname = bundle = changegroup.writechunks(ui, b2._forwardchunks(),
469 bundlename)
470 else:
459 if other.capable('getbundle'):
471 if other.capable('getbundle'):
460 cg = other.getbundle('incoming', common=common, heads=rheads)
472 cg = other.getbundle('incoming', common=common, heads=rheads)
461 elif onlyheads is None and not other.capable('changegroupsubset'):
473 elif onlyheads is None and not other.capable('changegroupsubset'):
@@ -350,7 +350,7 b' Test actual protocol when pulling one ne'
350 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
350 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
351 "GET /?cmd=capabilities HTTP/1.1" 200 -
351 "GET /?cmd=capabilities HTTP/1.1" 200 -
352 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
352 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db
353 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477
353 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477
354 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
354 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
355 $ cat errors.log
355 $ cat errors.log
356
356
General Comments 0
You need to be logged in to leave comments. Login now