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

Re: svnlook diff fails on binary files:

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-11-09 13:29:59 CET

cmpilato@collab.net writes:

> Blair Zajac <blair@orcaware.com> writes:
>
> > Just to be beat this into the ground, when diff returns 2, svnlook
> > quits immediately and doesn't generate the entire diff for the
> > revision, hence our commit email will be lacking info.
>
> I don't understand. Every time I've ever run diff on a binary file,
> it either prints nothing (no diff) or "Binary files foo and bar
> differ". Is this not true for you?
>
> Oh, I see.
>
> % cd /usr/share/pixmaps
> % diff tycoon.png ximian_button_pill.png
> Binary files tycoon.png and ximian_button_pill.png differ
> % echo $?
> 2

Good old diff!

$ diff -v
diff - GNU diffutils version 2.7
$ diff /bin/rm /bin/mv
Binary files /bin/rm and /bin/mv differ
$ echo $?
1
$ diff /bin/rm /bin/rm
$ echo $?
0

I changed the Subversion code so that a diff return value of 2 was an
error as that's what happens when diff has a write failure. If there
is a diff write failure then the diff will be incomplete, so we don't
really want Subversion to say that everything worked.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 9 13:30:46 2002

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.