def knownnodes(self, nodes): f = peer.future() yield {"nodes": wireproto.encodelist(nodes)}, f d = f.value try: yield [bool(int(b)) for b in pycompat.decodeutf8(d)] except ValueError: error.Abort(error.ResponseError(_("unexpected response:"), d))
def listkeyspatterns(self, namespace, patterns): if not self.capable("pushkey"): yield {}, None f = peer.future() self.ui.debug( 'preparing listkeys for "%s" with pattern "%s"\n' % (namespace, patterns) ) yield { "namespace": encoding.fromlocal(namespace), "patterns": wireproto.encodelist(patterns), }, f d = f.value self.ui.debug('received listkey for "%s": %i bytes\n' % (namespace, len(d))) yield pushkey.decodekeys(d)