diff mercurial/sshrepo.py @ 3446:0b450267cf47

Adding changegroupsubset and lookup to ssh protocol so pull -r and clone -r can be supported.
author Eric Hopper <hopper@omnifarious.org>
date Sat, 09 Sep 2006 18:25:06 -0700
parents 8770b4870e22
children ef1032c223e7
line wrap: on
line diff
--- a/mercurial/sshrepo.py	Wed Oct 18 02:08:36 2006 -0500
+++ b/mercurial/sshrepo.py	Sat Sep 09 18:25:06 2006 -0700
@@ -131,6 +131,13 @@
     def unlock(self):
         self.call("unlock")
 
+    def lookup(self, key):
+        d = self.call("lookup", key=key)
+        try:
+            return bin(d[:-1])
+        except:
+            raise hg.RepoError("unexpected response '%s'" % (d[:400] + "..."))
+
     def heads(self):
         d = self.call("heads")
         try:
@@ -160,6 +167,11 @@
         n = " ".join(map(hex, nodes))
         return self.do_cmd("changegroup", roots=n)
 
+    def changegroupsubset(self, bases, heads, kind):
+        bases = " ".join(map(hex, bases))
+        heads = " ".join(map(hex, heads))
+        return self.do_cmd("changegroupsubset", bases=bases, heads=heads)
+
     def unbundle(self, cg, heads, source):
         d = self.call("unbundle", heads=' '.join(map(hex, heads)))
         if d: