diff mercurial/exchange.py @ 37649:a168799687e5

wireproto: properly call clonebundles command We should not be using _call() to make wire protocol calls because it isn't part of the peer API. But clonebundles wasn't part of the supported commands in the peer API! So this commit defines that command in the commands interface, implements it, and teaches the one caller in core to call it using the command executor interface. Differential Revision: https://phab.mercurial-scm.org/D3317
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 13 Apr 2018 12:13:42 -0700
parents 8f3c6fb55369
children fc114a16a484
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri Apr 13 11:37:37 2018 -0700
+++ b/mercurial/exchange.py	Fri Apr 13 12:13:42 2018 -0700
@@ -2170,7 +2170,8 @@
     if not remote.capable('clonebundles'):
         return
 
-    res = remote._call('clonebundles')
+    with remote.commandexecutor() as e:
+        res = e.callcommand('clonebundles', {}).result()
 
     # If we call the wire protocol command, that's good enough to record the
     # attempt.