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

editor variable empty (was: Re: svn: system(' svn-commit.tmp') returned 32512)

From: Benjamin Pflugmann <benjamin-svn-dev_at_pflugmann.de>
Date: 2003-02-22 01:40:58 CET

Hi.

On Fri 2003-02-21 at 16:02:26 -0800, Ben Collins-Sussman wrote:
> Craig Longman <craigl@begeek.com> writes:
>
> > actually, the EDITOR was not set (i'm running bash on linux), but if i
> > _provide_ an EDITOR or a -m then it works great! fwiw, the output
> > from not having EDITOR set and having EDITOR set to "" appears to be
> > identical.
>
> Wow, we have genuine regression bug. I just unset EDITOR on my
> FreeBSD box, and instead of seeing the usual error about "you must use
> -F, -m or set EDITOR", I get the same error as you:
>
> svn: Error calling external program
> svn: Commit failed (details follow):
> subversion/clients/cmdline/util.c:201: (apr_err=200012)
> svn: system(' svn-commit.tmp') returned 32512
>
> Subversion should *not* be trying to run system(EDITOR) if the
> variable is undefined.
>
> Should we file this bug?

Just wanted to let you know, that I cannot reproduce this using r5011
on Linux:

> env -u EDITOR -u SVN_EDITOR -u VISUAL bash
  $ svn ci
  subversion/libsvn_client/commit.c:670: (apr_err=205007)
  svn: No external editor available
  svn: Commit failed (details follow):
  subversion/clients/cmdline/util.c:484: (apr_err=205007)
  svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options.
  subversion/clients/cmdline/util.c:117: (apr_err=205007)
  svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found.

That's the expected error, AFAICT. I also had a look at the source
(subversion/clients/cmdline/util.c) and it checks for the result of
editor being NULL, which would be the result from getenv() when a
variable is not set (from man getenv):

  The getenv() function returns a pointer to the value in the environ-
  ment, or NULL if there is no match.

Just for completness, I do get the same error as you, if I set one of
the variables to the empty string. One can argue if Subversion should
check for that case, too.

So if I had to guess, I would have a look whether SVN_EDITOR or VISUAL
are set to an empty string or if the editor is set in Subversion's
config file that way.

Bye,

        Benjamin.

  • application/pgp-signature attachment: stored
Received on Sat Feb 22 01:41:45 2003

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