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