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

Re: svn blame miscategorizing a file as binary

From: Archie Cobbs <archie_at_dellroad.org>
Date: 2004-10-06 23:43:11 CEST

Philip Martin wrote:
> >> $ svn proplist -v generic-build.xml
> >> Properties on 'generic-build.xml':
> >> svn:mime-type : text/xml
> > ^^^^^^^^
> > This is the reason. Subversion considers XML files to be binary for
> > the simple reason that normal diff's won't always produce sensible
> > patches for XML files. They may be human-readable, but they are not
> > strictly text.
> No, text/xxxx files are non-binary, take a look at the function
> svn_mime_type_is_binary.
> I guess what's happening is that one of the previous revisions of the
> file had a binary type; since blame checks the type of all the
> revisions involved having one revision with a binary mime-type will
> cause blame to fail. It's possible to restrict blame to only those
> revisions since the binary one, but that revision range may well not
> be enough to be useful.
> It's unfriendly for blame to behave this way. There is no way to
> modify the mime-type on old revisions, so if one accidentally commits
> a revision with a binary mime-type there is no way to correct it to
> enable blame to run. Perhaps blame should be changed so that only the
> current mime-type is used? Yes, that might allow a "real" binary file
> to erroneously take part in blame, but is that likely? I'd guess that
> when the mime-type indicates inconsistent "binaryness" the most likely
> explanation is an error in setting mime-type rather than a change in
> the format of the file contents.

It seems "obvious" to me that the correct behavior is to use the MIME type
associated with whatever version of the file "svn blame" is showing you,
as you suggest. The individual lines in the file may have been committed
in different revisions (some of which had binary type) but each line is
part of the revision you've chosen to look at and therefore should inherit
its binaryness from the MIME type associated with that revision (only).

Shall I file a bug?


Archie Cobbs * CTO, Awarix * http://www.awarix.com

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 7 00:00:15 2004

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.