##// END OF EJS Templates
merge with stable
Matt Mackall -
r23684:14ac0c15 merge default
parent child Browse files
Show More
@@ -20,6 +20,8 b' class remotelock(object):'
20 self.release()
20 self.release()
21
21
22 def _serverquote(s):
22 def _serverquote(s):
23 if not s:
24 return s
23 '''quote a string for the remote shell ... which we assume is sh'''
25 '''quote a string for the remote shell ... which we assume is sh'''
24 if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
26 if re.match('[a-zA-Z0-9@%_+=:,./-]*$', s):
25 return s
27 return s
@@ -45,7 +47,10 b' class sshpeer(wireproto.wirepeer):'
45 sshcmd = self.ui.config("ui", "ssh", "ssh")
47 sshcmd = self.ui.config("ui", "ssh", "ssh")
46 remotecmd = self.ui.config("ui", "remotecmd", "hg")
48 remotecmd = self.ui.config("ui", "remotecmd", "hg")
47
49
48 args = util.sshargs(sshcmd, self.host, self.user, self.port)
50 args = util.sshargs(sshcmd,
51 _serverquote(self.host),
52 _serverquote(self.user),
53 _serverquote(self.port))
49
54
50 if create:
55 if create:
51 cmd = '%s %s %s' % (sshcmd, args,
56 cmd = '%s %s %s' % (sshcmd, args,
General Comments 0
You need to be logged in to leave comments. Login now