Comments
Patch
@@ -540,17 +540,32 @@
and peer.capable('getbundle')
and peer.capable('bundle2'))
if canbundle2:
- kwargs = {}
- kwargs[r'common'] = common
- kwargs[r'heads'] = rheads
- kwargs[r'bundlecaps'] = exchange.caps20to10(repo, role='client')
- kwargs[r'cg'] = True
- b2 = peer.getbundle('incoming', **kwargs)
- fname = bundle = changegroup.writechunks(ui, b2._forwardchunks(),
- bundlename)
+ with peer.commandexecutor() as e:
+ fincoming = e.callcommand('getbundle', {
+ 'source': 'incoming',
+ 'common': common,
+ 'heads': rheads,
+ 'bundlecaps': exchange.caps20to10(repo, role='client'),
+ 'cg': True,
+ })
+
+ e.sendcommands()
+ b2 = fincoming.result()
+
+ fname = bundle = changegroup.writechunks(ui,
+ b2._forwardchunks(),
+ bundlename)
else:
if peer.capable('getbundle'):
- cg = peer.getbundle('incoming', common=common, heads=rheads)
+ with peer.commandexecutor() as e:
+ fincoming = e.callcommand('getbundle', {
+ 'source': 'incoming',
+ 'common': common,
+ 'heads': rheads,
+ })
+
+ e.sendcommands()
+ cg = fincoming.result()
elif onlyheads is None and not peer.capable('changegroupsubset'):
# compat with older servers when pulling all remote heads
@@ -596,7 +611,13 @@
if bundlerepo:
reponodes = [ctx.node() for ctx in bundlerepo[bundlerepo.firstnewrev:]]
- remotephases = peer.listkeys('phases')
+
+ with peer.commandexecutor() as e:
+ flistkeys = e.callcommand('listkeys', {
+ 'namespace': 'phases',
+ })
+
+ remotephases = flistkeys.result()
pullop = exchange.pulloperation(bundlerepo, peer, heads=reponodes)
pullop.trmanager = bundletransactionmanager()