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

Re: Return status of `svn diff'

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-05-08 23:37:02 CEST

"Stefan Monnier" <monnier+gmane.comp.version-control.subversion.devel/news/@rum.cs.yale.edu> writes:

> Is there any particular reason why `svn diff' does not return a 0/1
> status similar to plain `diff' (i.e. indicating whether or not there
> was any actual difference) ?
> If it is just accidental, could it be changed ?

The svn client program returns 1 to indicate an error happened, just
like most programs do. It would be really strange and inconsistent,
IMO, to have 'return 1' mean something completely different just
because you invoked the 'diff' subcommand.

> It is not of the utmost importance, but it can be convenient in scripts.

If you want to know whether a diff occurred, couldn't you just check
to see if any lines were printed to stdout? :-)

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 8 23:38:06 2003

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.