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

Exit codes for svn diff

From: Donal McNamee <donal.mcnamee_at_e-nextcom.net>
Date: 2006-03-09 12:39:19 CET

Hi,
Can someone explain to me why "svn diff" and standard UNIX diff return
different exit codes? Is there a reason for this?

For example,
== UNIX diff ==
diff fileA.txt fileB.txt (where there is no difference between the
files) exit code "0"
diff fileA.txt fileB.txt (where there IS a difference between the files)
exit code "1"
diff fileA.txt fileB.txt (where one of the two files does not exist)
exit code "2"

meanwhile with svn diff

svn diff -r 2:3 fileA.txt (where there is no difference between the
versions) exit code "0"
svn diff -r 2:3 fileA.txt (where there IS a difference between the
versions) exit code "0"
svn diff -r 2:3 fileA.txt (where the file does not exist) exit code "1"

Thanks,
Donal.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 9 13:13:21 2006

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.