mercurial/sshrepo.py
changeset 2421 a1cfe679192c
parent 2420 144280f1578f
child 2437 2f5dbc24874a
child 2439 e8c4f3d3df8c
--- a/mercurial/sshrepo.py	Fri Jun 09 17:48:14 2006 -0500
+++ b/mercurial/sshrepo.py	Fri Jun 09 18:03:35 2006 -0500
@@ -37,6 +37,7 @@
         self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
 
         # skip any noise generated by remote shell
+        self.do_cmd("hello")
         r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
         lines = ["", "dummy"]
         max_noise = 500
@@ -54,6 +55,13 @@
                 ui.debug(_("remote: "), l1)
             raise hg.RepoError(_("no response from remote hg"))
 
+        self.capabilities = ()
+        lines.reverse()
+        for l in lines:
+            if l.startswith("capabilities:"):
+                self.capabilities = l[:-1].split(":")[1].split()
+                break
+
     def readerr(self):
         while 1:
             size = util.fstat(self.pipee).st_size