Mercurial > public > mercurial-scm > hg-stable
diff mercurial/wireproto.py @ 11591:0d9cb3f3b0a1
protocol: unify client changegroup methods
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Jul 2010 17:09:31 -0500 |
parents | 8a1f625e971d |
children | 26e0782b8380 |
line wrap: on
line diff
--- a/mercurial/wireproto.py Wed Jul 14 17:07:13 2010 -0500 +++ b/mercurial/wireproto.py Wed Jul 14 17:09:31 2010 -0500 @@ -91,6 +91,18 @@ def stream_out(self): return self._callstream('stream_out') + def changegroup(self, nodes, kind): + n = " ".join(map(hex, nodes)) + f = self._callstream("changegroup", roots=n) + return self._decompress(f) + + def changegroupsubset(self, bases, heads, kind): + self.requirecap('changegroupsubset', _('look up remote changes')) + bases = " ".join(map(hex, bases)) + heads = " ".join(map(hex, heads)) + return self._decompress(self._callstream("changegroupsubset", + bases=bases, heads=heads)) + # server side def dispatch(repo, proto, command):