[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-10-06 21:52:33 CEST

John Peacock <jpeacock@rowman.com> writes:

> Archie Cobbs 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.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 6 21:52:41 2004

This is an archived mail posted to the Subversion Dev mailing list.