[PATCH] ssh: use shlex to parse command line
Patrick Mézard
pmezard at gmail.com
Sat Sep 8 17:11:34 CDT 2007
Steve Borho a écrit :
> On Sat, 2007-09-08 at 22:55 +0200, Patrick Mézard wrote:
>> Steve Borho a écrit :
>>> ... which looks pretty good. It seems os.popen3() is successfully
>>> parsing the ssh command name, but the rest of the argument parsing
>>> (probably a function of the windows shell) is broken.
>> What about the attached patch (against crew-stable) ?
>>
>> Tests pass under windows and macosx but they do not exercize it very
>> much and it's hard to build one not looking too kludgy. I think quoting
>> all arguments should be harmless under unix but I may be wrong.
>
> Your patch looks pretty similar to mine, so I don't understand why it
> would work when mine didn't. What is your ssh command set to under
> Windows? Does it start with a quoted command name?
I just add bonus double-quotes around the whole command to make the
windows command processing happy, otherwise it's similar. I tested it
with "plink -C", ""c:\program files\plink\plink.exe" -C", and "ssh -C".
Maybe I am not testing the right issue, please give me more details if
it still fails for you.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list