def heads(self): d = self._call('heads') if d[:len(_heads_prefix)] == _heads_prefix: d = d[len(_heads_prefix):] try: return wireproto.decodelist(d[:-1]) except ValueError: self._abort(error.ResponseError(_("unexpected response:"), d))
def heads(self): f = wireproto.future() yield {}, f d = f.value if d[:len(_heads_prefix)] == _heads_prefix: d = d[len(_heads_prefix):] try: yield wireproto.decodelist(d[:-1]) except ValueError: self._abort(error.ResponseError(_("unexpected response:"), d))
def srv_pullobsmarkers(repo, proto, others): """serves a binary stream of markers. Serves relevant to changeset between heads and common. The stream is prefix by a -string- representation of an integer. This integer is the size of the stream.""" opts = wireproto.options('', ['heads', 'common'], others) for k, v in opts.iteritems(): if k in ('heads', 'common'): opts[k] = wireproto.decodelist(v) obsdata = _getobsmarkersstream(repo, **opts) finaldata = StringIO() obsdata = obsdata.getvalue() finaldata.write('%20i' % len(obsdata)) finaldata.write(obsdata) finaldata.seek(0) return wireproto.streamres(proto.groupchunks(finaldata))
def srv_obshash1(repo, proto, nodes): return wireproto.encodelist(_obshash(repo, wireproto.decodelist(nodes), version=1))
def srv_obshash(repo, proto, nodes): return wireproto.encodelist(_obshash(repo, wireproto.decodelist(nodes)))