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

Re: svn info not setting exit status.

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Tue, 20 May 2008 17:12:01 -0400

"Mark E. Hamilton" <mhamilt_at_sandia.gov> writes:
> I can't really speak to precedent, only what I think. If I ask svn to
> do something, I want to be able to decide easily if I should continue
> based on whether or not it was able to do what I asked. In the case of
> executing 'svn info' on the command it is reasonable for a user to do
> svn info A B C' and not care about the exit status, because they can
> see any errors on the screen.
>
> However, when scripting some process I would never do more than one at
> a time, because there is no easy way to tell which one failed. You
> should, IMO, always do
>
> svn info A || handle error
> svn info B || handle error
> svn info C || handle error
>
> Also, for 'svn info' it is reasonable for it to continue to run if it
> encounters an error since it is a read-only operation. What I have
> done in the past in similar code is to return the exit status of the
> last failed operation after the end of the loop. Knowing that one (or
> more) failed is better than not knowing at all.

Done in r31320.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-20 23:12:31 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.