##// END OF EJS Templates
ssh: add capability detection at startup...
Matt Mackall -
r2421:a1cfe679 default
parent child Browse files
Show More
@@ -37,6 +37,7 b' class sshrepository(remoterepository):'
37 self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
37 self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
38
38
39 # skip any noise generated by remote shell
39 # skip any noise generated by remote shell
40 self.do_cmd("hello")
40 r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
41 r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
41 lines = ["", "dummy"]
42 lines = ["", "dummy"]
42 max_noise = 500
43 max_noise = 500
@@ -54,6 +55,13 b' class sshrepository(remoterepository):'
54 ui.debug(_("remote: "), l1)
55 ui.debug(_("remote: "), l1)
55 raise hg.RepoError(_("no response from remote hg"))
56 raise hg.RepoError(_("no response from remote hg"))
56
57
58 self.capabilities = ()
59 lines.reverse()
60 for l in lines:
61 if l.startswith("capabilities:"):
62 self.capabilities = l[:-1].split(":")[1].split()
63 break
64
57 def readerr(self):
65 def readerr(self):
58 while 1:
66 while 1:
59 size = util.fstat(self.pipee).st_size
67 size = util.fstat(self.pipee).st_size
General Comments 0
You need to be logged in to leave comments. Login now