[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: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2002-02-06 12:48:01 CET

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.
> 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?
Kevin Pilch-Bisson http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:37:04 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.