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

Skipping binary files when "svn diff" old revisions with incorrect svn:mime-type properties

From: Steve Strobel <steve.strobel_at_link-comm.com>
Date: Thu, 18 Sep 2008 11:23:39 -0600

I am trying to generate a diff between two revisions with a command like

         svn diff svn://192.168.25.29/trunk_at_2 svn://192.168.25.29/trunk_at_232

Unfortunately some of the files are binary but for some reason did
not get their svn:mime-type property set to application/octet-stream,
which causes the diff to end up with a bunch of unreadable binary
characters in it. I would like diff to skip those files with a message like

         Cannot display: file marked as a binary type.
         svn:mime-type = application/octet-stream

I hoped to accomplish this by retroactively setting the svn:mime-type
property of each such file, so I added the following to the
pre-revprop-change hook script (*.bat file under Windows with svnserve):

         IF "%SVN_PROPNAME%" == "svn:mime-type" exit 0

I can now execute the propset command without getting an error message:

         svn propset --revprop -r 6 svn:mime-type
application/octet-stream
svn://192.168.25.29/trunk/vendors/AnalogDevices/RLC_DSP4/dsp4
         property 'svn:mime-type' set on repository revision 6

but it doesn't seem to work. The diff still has the same problem and
proplist doesn't show the property:

         svn proplist
svn://192.168.25.29/trunk/vendors/AnalogDevices/RLC_DSP4/dsp4
         Properties on
'svn://192.168.25.29/trunk/vendors/AnalogDevices/RLC_DSP4/dsp4':
           svn:executable

I am guessing that I can't change the properties retroactively like
that for anything except svn:date, svn:author and svn:log because
they are versioned and versions are immutable. As an aside, I think
propset should give an error message when it is unable to do what you
ask. I could add the property to the binary files in a working copy
and commit them, but I don't think that is going to help me diff the
older revisions (some of those files might not even exist in the
working copy on head). Is there another way to get a diff without
the binary files mucking it up?

Thanks for any suggestions,

Steve

---
Steve Strobel
Link Communications, Inc.
1035 Cerise Rd
Billings, MT 59101-7378
(406) 245-5002 ext 102
(406) 245-4889 (fax)
WWW: http://www.link-comm.com
MailTo:steve.strobel_at_link-comm.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-18 19:24:13 CEST

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.