Mercurial > hg
comparison mercurial/wireprotov1peer.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 | 72e26319f3b8 |
children | 62ebfda864de |
comparison
equal
deleted
inserted
replaced
37648:8f3c6fb55369 | 37649:a168799687e5 |
---|---|
319 """ | 319 """ |
320 def commandexecutor(self): | 320 def commandexecutor(self): |
321 return peerexecutor(self) | 321 return peerexecutor(self) |
322 | 322 |
323 # Begin of ipeercommands interface. | 323 # Begin of ipeercommands interface. |
324 | |
325 def clonebundles(self): | |
326 self.requirecap('clonebundles', _('clone bundles')) | |
327 return self._call('clonebundles') | |
324 | 328 |
325 @batchable | 329 @batchable |
326 def lookup(self, key): | 330 def lookup(self, key): |
327 self.requirecap('lookup', _('look up remote revision')) | 331 self.requirecap('lookup', _('look up remote revision')) |
328 f = future() | 332 f = future() |