Ejemplo n.º 1
0
def peernarrowwiden(remote, **kwargs):
    for ch in (r'oldincludes', r'newincludes', r'oldexcludes', r'newexcludes',
               r'commonheads', r'known'):
        kwargs[ch] = wireprototypes.encodelist(kwargs[ch])

    kwargs[r'ellipses'] = '%i' % bool(kwargs[r'ellipses'])
    f = remote._callcompressable('narrow_widen', **kwargs)
    return bundle2.getunbundler(remote.ui, f)
Ejemplo n.º 2
0
def listkeyspatterns(self, namespace, patterns):
    if not self.capable('pushkey'):
        yield {}, None
    f = wireprotov1peer.future()
    self.ui.debug('preparing listkeys for "%s"\n' % namespace)
    yield {
        'namespace': encoding.fromlocal(namespace),
        'patterns': wireprototypes.encodelist(patterns)
    }, f
    d = f.value
    self.ui.debug('received listkey for "%s": %i bytes\n' %
                  (namespace, len(d)))
    yield pushkey.decodekeys(d)