You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Donal McNamee <do...@e-nextcom.net> on 2006/03/09 11:39:19 UTC

Exit codes for svn diff

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