[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: <cmpilato_at_collab.net>
Date: 2002-04-16 20:23:57 CEST

Philip Martin <philip@codematters.co.uk> writes:

> cmpilato@collab.net writes:
>
> > You know what, I reread my algorithm, and I *do* think it works in the
> > case you cited:
> >
> > First, Subversion would try:
> >
> > cmd="/path/to/foo dir/program arg1 arg2"
> > args=( "msg.00000.12345.tmp" )
> >
> > This would fail. We'd try:
> >
> > cmd="/path/to/foo dir/program arg1"
> > args=( "args2", "msg.00000.12345.tmp" )
> >
> > This would fail.
>
> No it wouldn't. As well as as the executable file
>
> /path/to/foo dir/program
>
> which is the one I want to run, I also have one called
>
> /path/to/foo dir/program arg1
>
> 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 :-(

As I stated in my way, there are ways to break the algorithm. Yes, if
you're an idiot, you can have a script on your machine named "emacs
-nw".

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.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 16 20:27:26 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.