comparison mercurial/sshrepo.py @ 1330:0fcde73dc3ca

Give ssh a better chance of working on Windows. Switch the type of quotes used for the remote command. Open the pipe in binary mode.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 23 Sep 2005 10:30:41 -0700
parents 84cf8834efb5
children 404484c9628e
comparison
equal deleted inserted replaced
1329:8f06817bf266 1330:0fcde73dc3ca
27 args = self.user and ("%s@%s" % (self.user, self.host)) or self.host 27 args = self.user and ("%s@%s" % (self.user, self.host)) or self.host
28 args = self.port and ("%s -p %s") % (args, self.port) or args 28 args = self.port and ("%s -p %s") % (args, self.port) or args
29 29
30 sshcmd = self.ui.config("ui", "ssh", "ssh") 30 sshcmd = self.ui.config("ui", "ssh", "ssh")
31 remotecmd = self.ui.config("ui", "remotecmd", "hg") 31 remotecmd = self.ui.config("ui", "remotecmd", "hg")
32 cmd = "%s %s '%s -R %s serve --stdio'" 32 cmd = '%s %s "%s -R %s serve --stdio"'
33 cmd = cmd % (sshcmd, args, remotecmd, self.path) 33 cmd = cmd % (sshcmd, args, remotecmd, self.path)
34 34
35 self.pipeo, self.pipei, self.pipee = os.popen3(cmd) 35 self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
36 36
37 def readerr(self): 37 def readerr(self):
38 while 1: 38 while 1:
39 r,w,x = select.select([self.pipee], [], [], 0) 39 r,w,x = select.select([self.pipee], [], [], 0)
40 if not r: break 40 if not r: break