--- a/mercurial/sshrepo.py
+++ b/mercurial/sshrepo.py
@@ -37,6 +37,7 @@ class sshrepository(remoterepository):
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 @@ class sshrepository(remoterepository):
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