[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] $EDITOR with spaces

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-04-17 21:32:04 CEST

Daniel Stenberg wrote:

>On 16 Apr 2002 cmpilato@collab.net wrote:
>
>>>i.e. one with a space in the program name as well as in one of the
>>>directories. Unfortunately this one deletes my working copy :-(
>>>
>>Here's the deal -- what do we need to do to get functionality consistent
>>with other $EDITOR-using programs (like CVS)? Looking at CVS source, it
>>just does a strtok() on " \t" to hack a command string into an argslist,
>>then has a fork()/execvp() combo. I would imagine this is how most Unix
>>programs use $EDITOR, and I guess I don't really feel adventurous enough to
>>try to forge new ground in this area.
>>
>
>I vote for requiring spaces to be escaped (possibly with backslashes like
>"\ "), otherwise use them as separators. It would make existing
>space-for-separator using EDITOR strings to work as before, and new ones
>using-space-in-command-name could just learn to follow the escaping.
>
Hm, so you're gonna parse escapes in $EDITOR in the svn code? What say
we just forget it and call system() for this particular case, and let
the shell handle that for us? For Windows, we just have to document that
if you have spaces in the path, you must enclose the program name in
double quotes, and cmd.exe (or command.com) will just magically DTRT.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Apr 17 21:34:46 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.