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

Re: svn commit: rev 1826 - trunk/subversion/clients/cmdline

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-04-29 20:38:44 CEST

On Mon, Apr 29, 2002 at 07:33:03PM +0100, Philip Martin wrote:
> daniel@tigris.org writes:
>
> > /* Now, run the editor command line. Ignore the return values; all
> > we really care about (for now) is whether or not our tmpfile
> > contents have changed. */
> > - cmd_args[0] = editor;
> > - cmd_args[1] = tmpfile_name->data;
> > - SVN_ERR (svn_io_run_cmd (".", editor, cmd_args, &exit_code, &exit_why,
> > - TRUE, NULL, NULL, NULL, pool));
> > + cmd = apr_psprintf (pool, "%s %s", editor, tmpfile_name->data);
> > +
> > + system (cmd);
>
> What? No checking of the return code?

Yeah, it should. But, note that the return values are going to be
WEXITSTATUSified.

RETURN VALUE
       The value returned is -1 on error (e.g. fork failed), and
       the return status of the command otherwise. This latter
       return status is in the format specified in wait(2).
       Thus, the exit code of the command will be WEXITSTA­
       TUS(status). In case /bin/sh could not be executed, the
       exit status will be that of a command that does exit(127).

I know that CVS detects when no log message is created and pops up
the "abort, retry, fail" (not exactly) prompt. We may be able to
also do that when the editor fails to run. (I forget what SVN
does when there is no log message...) -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 29 20:40:12 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.