[issue2224] Command quoting before popen breaks ssh:// on Windows 95
Andy Walls
bugs at mercurial.selenic.com
Thu Jun 3 13:47:22 UTC 2010
New submission from Andy Walls <andy at silverblocksystems.net>:
In sshrepo.py, quoting the command before calling popen3
breaks spawning the the ssh command (plink in this case) on Windows 95:
http://selenic.com/hg/file/1dd69d159e5c/mercurial/sshrepo.py#l63
So the command
> python c:\Python25\Scripts\hg clone ssh://myuser@myserver/hg/projrepo
Fails with the key error message being
remote: Bad command or file name
"Bad command or file name" is not coming from the remote side but from
COMMAND.COM on the local machine.
A command completely quoted like this
"C:\PROGRA~1\PuTTY\plink.exe -batch -agent -ssh -i C:\foo\mykey.ppk "hg -R
hg/projrepo server --stdio""
appears to cause COMMAND.COM to look for the whole quoted string as
something to run. Removing the outer quotes fixes things.
Commenting out the line in sshrepo.py that quotes the command before the
popen, makes the clone operation via ssh:// work.
If anyone cares about Win95 anymore, I suppose the real fix needs to happen
here:
http://selenic.com/hg/file/1dd69d159e5c/mercurial/windows.py#l161
(but I don't know what it should be.)
Versions:
Mercurial 1.5.3 (pure python build from source tar.gz)
Python 2.5.4 (binary .msi package from Python.org)
PuTTY 0.60 (plink, pageant, putty, psftp, etc. binaries from PuTTY website)
Windows 95 (MSDOS 7.0) (The first release of Windows 95, not OSR2)
Winsock v2 update for Windows 95
----------
messages: 12733
nosy: awalls
priority: bug
status: unread
title: Command quoting before popen breaks ssh:// on Windows 95
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2224>
____________________________________________________
More information about the Mercurial-devel
mailing list