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

Re: A question related to svn_io_run_cmd()

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-02-06 22:47:29 CET

Kevin Pilch-Bisson wrote:

>On Wed, Feb 06, 2002 at 10:22:40AM +0100, Daniel Stenberg wrote:
>
>>Hi
>>
>>With the 1189 commit, I could remove my system() kludge in the $EDITOR code
>>and use svn_io_run_cmd().
>>
>>This ALMOST works the way I want now. And this is a question for feedback on
>>where we want the remaining problem fixed:
>>
>>$ export EDITOR=vi (or EDITOR=emacs or EDITOR=echo)
>>$ svn ci
>>
>>all work as assumed, but
>>
>>$ export EDITOR="emacs -nw"
>>$ svn ci
>>
>>does not. This way of setting the EDITOR variable works for most other
>>applications, including CVS and crontab etc why I argue SVN should support it
>>too.
>>
>>The reason for the malfunction is that I pass the full string "emacs -nw" as
>>CMD name to svn_io_run_cmd(), when it really should've been split up and the
>>"-nw" should've been placed in ARGS[1].
>>
>
>There is a function name svn_cl__stringlist_to_array() which was written to
>solve this same problem for svn diff. You could just call it on the results
>of the getenv("EDITOR") call.
>
And beware spaces in file/dir names!

>
>>My question is, should I write the wrapper to handle this in commmit-cmd.c
>>for just the EDITOR functionality, or is this something we might need to make
>>a more generic approach for in svn_io_run_cmd() or a related function?
>>
>>Other thoughts?
>>

-- 
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 Sat Oct 21 14:37:05 2006

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.