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

Re: "svn lock" process return code (Subversion 1.2 RC2 Win32)

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-05-11 16:56:25 CEST

On Tue, 10 May 2005, Julian Foad wrote:

> Rowell, Geoff wrote:
> >On Sat, May 07 2005, Peter N. Lundblad wrote:
> > If you might depend on the result of the command to control the flow
> > of operations, then an exit code should indicate any deviation from
> > complete success.
> >
> > In this case, an inability to acquire a lock will prevent your being able
> > to commit file changes. This should be signaled by a non-zero exit code.
> I would say that this particular case (file is locked by another user) should
> be classed as an Error. Whenever a Subversion command encounters an Error, it
> should print an error message and exit immediately with a non-zero status
> without processing any further targets.
Hmmm... this is controlled by the SVN_ERR_IS_LOCK_ERROR macro. I'm not
sure here.

> We may want to handle some other cases (e.g. file is already locked by you in
> this WC) as a Warning. Whenever a Subversion command gives a Warning, it
> should print a message that says "warning", proceed to process any other
> targets, and exit with a zero status if every target resulted in success or a
> warning.
> No Subversion command should behave in a manner that is in between an Error and
> a Warning.
FYI, if you revert a file and that fails, you'll get something between:
"Failed to revert 'file' -- try updating instead". So we aren't consistent
here currently. And that returns 0. I'm not saying we couldn't return
non-zero in both these cases, but we should at least be consistent.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 11 18:22:20 2005

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.