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

Re: "svn info" good return code on bad URL

From: John Belmonte <john_at_neggie.net>
Date: 2005-10-12 14:00:03 CEST

I wrote:
> 1) Please let's not do the "different return codes for warnings and
> error" thing. I've had the experience trying to deal with the tool
> "tidy" which does this, and it's very hard to work with, at least from
> sh or bash. For example, if you want to capture the tool output with
> command substitution (e.g. FOO=`svn info $URL`), there is no way (that
> I've been able to find) to get the return code.

One more point here. In UNIX, non-zero return codes are really
considered errors. When running a shell script with "sh -e", which I
consider best practice, any non-zero return code is going stop your
program. The only sane solution, if you really need one in the first
place, is to give tools an option to promote warnings to errors (e.g.
gcc -Werror).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 12 14:01:34 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.