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

RE: SVN Blame Returns Corrupt Data

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Fri, 11 Oct 2013 13:58:31 +0000

> On Thu, Oct 10, 2013 at 5:49 PM, Bob Archer <Bob.Archer_at_amsi.com> wrote:
> I assume he was asking how to "fix" the blame. Cause, sure, he could open
> the file, convert it back to UTF-8 with CRLF line endings... and commit it... of
> course, now blame is going to show him on every line, since he just changed
> every line.
>
> That's exactly what I meant.  You're correct with how the blame is handled.  I
> committed the UTF-8 copy to a test branch, diff'd, and it showed every line
> as being changed.  Unfortunately it looks like this is our best option.

Yep, we have done the same thing. As a matter of fact, I just over the past few days rescripted all our database scripts to be UTF-8 since merging them just doesn't work correctly when they are UTF-16 even if you remove the binary mime type.

>
>
> On Thu, Oct 10, 2013 at 7:07 PM, Ben Reser <ben_at_reser.org> wrote:
> At current blame is not UTF-16 aware.

It's not just blame that isn't... the diff engine, or whatever detects file types always considers UTF-16 files to be binary. If you "add" a UTF-16 file you see that svn adds the application/octet-stream mime type. There is an issue in the bug database about this from when I reported/complained about it... however it hasn't been addressed. I'm surprised still at this time that svn still can't support UTF-16 text files as text wrt adding, diffing, blaming, etc.

BOb

>
> About a year ago there was a "patch" (actually they just reposted an entire
> copy of blame.c) posted that helped, but it really didn't go anywhere since
> the original poster didn't continue following up.
>
> Perhaps you'll find the above useful.  Patches are of course welcome.
>
> I'll take a look at that this weekend.  Thanks for all the input everyone.
>
>
> On Thu, Oct 10, 2013 at 7:07 PM, Ben Reser <ben_at_reser.org> wrote:
> On 10/10/13 12:17 PM, T.J. Perovich wrote:
> > On Thu, Oct 10, 2013 at 2:27 PM, Ryan Schmidt
> > <subversion-2012c_at_ryandesign.com <mailto:subversion-
> 2012c_at_ryandesign.com>> wrote:
> >>Sounds like you've converted the file from UTF-8 to UTF-16.
> >
> > Thanks, you're absolutely right.  It changed from UTF-8 to UTF-16LE.
> >
> > Any idea how to go about fixing it elegantly?  We have about 3 months
> > of commits since this happened.  Diff's in the GUIs have been working
> > fine and we don't blame too often which is why it was never noticed.
> At current blame is not UTF-16 aware.
>
> About a year ago there was a "patch" (actually they just reposted an entire
> copy of blame.c) posted that helped, but it really didn't go anywhere since
> the original poster didn't continue following up.
>
> https://mail-archives.apache.org/mod_mbox/subversion-
> dev/201207.mbox/%3CCAAF0CB13B282344AF95AD2DE3D1962215627A3C%40
> DAG-B.nexon.corp%3E
>
> and the followup
>
> https://mail-archives.apache.org/mod_mbox/subversion-
> dev/201208.mbox/%3CCAB84uBVVrHFfQyEA5pF5gStMpXz+RH2jKvdvCQsCO
> CJv+RqtWw_at_mail.gmail.com%3E
>
> Perhaps you'll find the above useful.  Patches are of course welcome.
Received on 2013-10-11 15:59:11 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.