Skip to content
Snippets Groups Projects
Commit 24057391 authored by kiilerix's avatar kiilerix
Browse files

Create ssh subprocess with a shell command instead of an exec list

This allows ui.ssh to be configured with a command line fragment instead of
just the name of an executable.
parent 37a06b90
No related branches found
No related tags found
No related merge requests found
from mercurial import util
class SSHVendor(object):
"""Parent class for ui-linked Vendor classes."""
......@@ -16,8 +18,11 @@
sshcmd = ui.config("ui", "ssh", "ssh")
args = util.sshargs(sshcmd, host, username, port)
proc = subprocess.Popen([sshcmd, args] + command,
cmd = '%s %s %s' % (sshcmd, args,
util.shellquote(' '.join(command)))
ui.debug('calling ssh: %s\n' % cmd)
print command
proc = subprocess.Popen(util.quotecommand(cmd), shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)
return SubprocessWrapper(proc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment