##// END OF EJS Templates
ssh: gather initial output so we can do capability detection
Matt Mackall -
r2420:144280f1 default
parent child Browse files
Show More
@@ -38,17 +38,16 b' class sshrepository(remoterepository):'
38
38
39 # skip any noise generated by remote shell
39 # skip any noise generated by remote shell
40 r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
40 r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40)))
41 l1 = ""
41 lines = ["", "dummy"]
42 l2 = "dummy"
43 max_noise = 500
42 max_noise = 500
44 while l2 and max_noise:
43 while lines[-1] and max_noise:
45 l2 = r.readline()
44 l = r.readline()
46 self.readerr()
45 self.readerr()
47 if l1 == "1\n" and l2 == "\n":
46 if lines[-1] == "1\n" and l == "\n":
48 break
47 break
49 if l1:
48 if l:
50 ui.debug(_("remote: "), l1)
49 ui.debug(_("remote: "), l)
51 l1 = l2
50 lines.append(l)
52 max_noise -= 1
51 max_noise -= 1
53 else:
52 else:
54 if l1:
53 if l1:
General Comments 0
You need to be logged in to leave comments. Login now