[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-11 17:52:09 CEST

Greg Hudson <ghudson@MIT.EDU> writes:

> On Mon, 2004-10-11 at 11:06, Simon Large wrote:
>> How likely is it that someone will version a binary file and then re-use
>> that same file as a text file?
>
> I'd agree with you, but a friend of mine recently surprised me by
> talking about converting GIFs to JPEGs while retaining history (he
> wanted "svn mv" to work having already moved the file). That's weird
> because the delta is meaningless, but you still want the log to travel
> from the JPEG to the GIF.
>
> In a similar vein, someone might convert a Word file to a Latex file as
> part of a copy operation.

Remember, blame displays the current version of the file. Even if the
file really was binary in the past, all the lines that get displayed
by blame are present in the current text file. I see no harm in
having blame ignore past mime-types. What could go wrong? Does
anything terrible happen? I suppose the diff algorithm may not handle
binary data efficiently, but then there are pathological text files
that are not handled effciently either. I suppose the diff algorithm
may fail to identify any of the lines as coming from the binary file,
but then that's probably correct!

I have no evidence, other than my own instinct, but I think that
nearly every time this situation arises it will be because someone
accidentally set the wrong mime-type in the past. I think we should
make the common case do the right thing.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 11 17:56:03 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.