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

Re: BAD! 'svn diff' exits with 0 when some difference exists.

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2006-08-19 18:00:02 CEST

On 8/19/06, Chen(陈? Jun(军? <chjfth@hotmail.com> wrote:
> For SVN 1.3.2 .
> I've just found that 'svn diff' command's exit-code is 0 even if it has
> found some difference.

I think this is intentional; when the 'svn' binary returns 0, it
means "no error happened", and non-zero means "an error happened".
It's certainly not an error to print out a difference! I might argue
that 'cvs diff' is being a bit strange when it does this.

> If 'svn diff' always return 0, it will be programmatically hard to
> know when difference occurs and stop the make system.

How about just looking at stdout? If anything is printed to stdout,
there's a difference. Doesn't that make more sense anyway?
Received on Sat Aug 19 18:00:34 2006

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.