[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: <cmpilato_at_collab.net>
Date: 2002-11-09 08:16:56 CET

Blair Zajac <blair@orcaware.com> writes:

> > So, the problem isn't so much that diff is run on binary files, it's
> > that we aren't discerning the meaning of the 2 error code in this
> > case. And since error code 2 is a really generic error code for diff,
> > the best thing to do is just to not diff binary files. Am I on track?
>
> I'm more concerned that something has changed and we don't know it.
> All of the svn logo's got checked in a while ago and we didn't see
> svnlook fail on the diffs.

The only important thing that has changed in this area is that
svn_io_run_diff didn't use to return the error code 2 to its caller.

   ------------------------------------------------------------------------
   rev 3421: philip | 2002-10-20 09:45:59 -0500 (Sun, 20 Oct 2002) | 5 lines

   Fix part of issue 779.

   * subversion/libsvn_subr/io.c (svn_io_run_diff): Treat a return value
     of 2 from the diff process as an error.
   ------------------------------------------------------------------------

> I don't know why svnlook diff is running diff on binary files in the
> first place.

Because I never added code to check the properties of the node for
binariness. If you'd like to do this, I would recommend:

   - adding a flag to the svn_repos_node_t: 'is_binary'
   - in the relevant places of libsvn_repos/node_tree.c, check for the
     svn:mime-type property on the nodes
   - in svnlook, have it check node->is_binary before running diff.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 9 08:19:27 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.