Mercurial > public > mercurial-scm > hg
comparison mercurial/sshrepo.py @ 5644:e2e8e977a6cb
win32: fix ssh://host:port when using Plink
Moves ssh argument building to platform specific utils code.
The win32 version looks for plink in ssh command string and
uses '-P' in lieu of '-p' for specifying a port
author | Steve Borho <steve@borho.org> |
---|---|
date | Wed, 12 Dec 2007 16:44:26 -0600 |
parents | 32ec518ee3cb |
children | 87e6b4f4871b |
comparison
equal
deleted
inserted
replaced
5641:4d6b630d3939 | 5644:e2e8e977a6cb |
---|---|
22 self.user = m.group(2) | 22 self.user = m.group(2) |
23 self.host = m.group(3) | 23 self.host = m.group(3) |
24 self.port = m.group(5) | 24 self.port = m.group(5) |
25 self.path = m.group(7) or "." | 25 self.path = m.group(7) or "." |
26 | 26 |
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 | |
29 | |
30 sshcmd = self.ui.config("ui", "ssh", "ssh") | 27 sshcmd = self.ui.config("ui", "ssh", "ssh") |
31 remotecmd = self.ui.config("ui", "remotecmd", "hg") | 28 remotecmd = self.ui.config("ui", "remotecmd", "hg") |
29 | |
30 args = util.sshargs(sshcmd, self.host, self.user, self.port) | |
32 | 31 |
33 if create: | 32 if create: |
34 cmd = '%s %s "%s init %s"' | 33 cmd = '%s %s "%s init %s"' |
35 cmd = cmd % (sshcmd, args, remotecmd, self.path) | 34 cmd = cmd % (sshcmd, args, remotecmd, self.path) |
36 | 35 |