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

Re: svn blame not working for files which had binary mime-type in a previous revision

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 31 Jan 2013 19:57:25 +0100

On Thu, Jan 31, 2013 at 07:35:07PM +0100, Ferenc Kovacs wrote:
> > I suppose we should improve Subversion's behaviour here by issuing a
> > warning if Subversion's own binary-file detection code doesn't identify
> > the file as binary when the user sets a binary mime-type.
> >
> > What do you think about that?
> >
> > svn: warning: 'application/xml' is a binary mime-type but file '%s' looks
> > like text; diff, merge, blame, and other operations will stop working on
> > this file
> >
> > This way, we point out the cause of the problem when it first appears,
> > rather than later.
> >
>
> Yeah, that is something nice from the user POV, as it would lessen the
> chance of screwups.

Ok great! I'll try to make this happen.

> Would it be possible to tell them to somehow show in there that only
> plain/*, image/x-xbitmap and image/x-xpixmap mimetypes can be used for
> those operations?

I think that would be too detailed. I also don't like the fact that
there is a list of mime-types which are considered text.

The official mime-type list is not maintained by Subversion, and it would
be silly to attempt to keep up-to-date with the official list.

Because of that, I think it was a mistake to document these two 'image/*'
types as text. Just saying "no mime-type property or a text/* mime-type
property indicates textual content" would have been better.

> Ofc. this still wouldn't help much if you already has a file with a "wrong"
> mimetype and bump into the Skipping binary file error message.

Fair enough.
I'd be willing to extend the existing error message as follows:

  Skipping file which is considered binary in one or more revisions (use --force to treat as text): 'foo/bar.xml'

Would that be good enough?
Received on 2013-01-31 19:58:05 CET

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.