[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: Cory Omand <comand_at_blastwave.org>
Date: 2005-10-12 19:22:45 CEST

John Belmonte 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.

Maybe someone has replied to you already on this, but:

FOO=`svn info $URL`

case $FOO_EXIT_CODE in
        1) echo "diffs found" ;;
         2) echo "warnings/errors" ;;
        *) echo "something completely different"

- C.

Cory Omand <comand@blastwave.org>
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 12 19:23:29 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.