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

RE: Blame on .csv and .sql files ( files which SVN thinks are binary )

From: Ian Wood <Ian.Wood_at_sucden.co.uk>
Date: 2007-11-28 14:22:47 CET

Hi Ryan,

Thanks for looking into this for me.

I found the suggestion by Karl Fogel of forcing works - but I really
want it to work with TortioseSVN as I am a WIMP (
http://en.wikipedia.org/wiki/WIMP_(computing) )

> You can also just pass the --force flag to blame:
> $ svn blame --force myfile.csv

Does it seem that there is either a bug with SVN ( 1.4.2 ) or something
else that needs to be set?

Thanks again,

Best regards,


-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com]
Sent: 28 November 2007 11:59
To: Ian Wood
Cc: Andy Levy; users@subversion.tigris.org
Subject: Re: Blame on .csv and .sql files ( files which SVN thinks are
binary )

On Nov 28, 2007, at 05:38, Ian Wood wrote:

>> On Nov 27, 2007, at 10:34, Ian Wood wrote:
>>>> On Nov 26, 2007 9:10 AM, Ian Wood wrote:
>>>>> Please can you tell me how I get SVN to blame .csv file and .sql
>>>>> files.
>>>> Apply an appropriate svn:mime-type property to them.
>>>> http://filext.com/file-extension/csv lists the mime-types commonly
>>>> used for CSV files (you probably want text/csv)
>>>> The same site doesn't have a listing for SQL files, but since
>>>> they're
>>>> plain text, text/plain (which is what I use) should work fine.
>>>> IIRC, Subversion treats any mime-type starting with text/ as plain
>>>> text.
>>> I have changed the property to text/plain in some CSV files and it
>>> works, however I have also done the same to some .sql files and it
>>> doesn't work. However the property is correctly set.
>> Please show us the output of these two commands:
>> svn proplist -v yourfile.sql
>> svn blame yourfile.sql
> I opened up cmd.exe and the results are below.
>> svn proplist -v yourfile.sql
> Properties on 'yourfile.sql':
> svn:mime-type : text/plain
>> svn blame yourfile.sql
> Skipping binary file: 'yourfile.sql'

That's odd. And I can reproduce it with Subversion 1.4.5 on Mac OS X
10.4.11 Intel. Apparently Subversion doesn't work the way I thought
it worked......

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
Checked out revision 0.
$ cd wc
$ date > foo.sql
$ date >> foo.sql
$ svn add foo.sql
A foo.sql
$ svn propset svn:mime-type "application/octet-stream" foo.sql
property 'svn:mime-type' set on 'foo.sql'
$ svn ci -m ""
Adding (bin) foo.sql
Transmitting file data .
Committed revision 1.
$ svn blame foo.sql
Skipping binary file: 'foo.sql'

# So far so hoopy. I told it to be a binary file so Subversion
# refuses to "blame" it. Now I want to make it a text file.

$ svn propset svn:mime-type "text/plain" foo.sql
property 'svn:mime-type' set on 'foo.sql'
$ svn blame foo.sql
Skipping binary file: 'foo.sql'
$ svn proplist -v foo.sql
Properties on 'foo.sql':
   svn:mime-type : text/plain

# Still doesn't work. Maybe I need to commit the property
# change first?

$ svn ci -m ""
Sending foo.sql

Committed revision 2.
$ svn blame foo.sql
Skipping binary file: 'foo.sql'

# Surprisingly (to me) it still doesn't allow "blame". By what
# criteria does Subversion still think this file is binary?

$ svn proplist -v foo.sql
Properties on 'foo.sql':
   svn:mime-type : text/plain
$ file foo.sql
foo.sql: ASCII text

Sucden (UK) Limited, 5 London Bridge Street, London SE1 9SG
Telephone +44 20 7940 9400
Registered in England no. 1095841
VAT registration no. GB 446 9061 33
Authorised and Regulated by the Financial Services Authority (FSA) and entered in the FSA register under no. 114239

This email, including any files transmitted with it, is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you are not the intended recipient of this message, please notify postmaster@sucden.co.uk immediately and delete it from your computer system.

We believe, but do not warrant, that this email and its attachments are virus-free, but you should check.

Sucden (UK) Ltd may monitor traffic data of both business and personal emails. By replying to this email, you consent to Sucden?s monitoring the content of any emails you send to or receive from Sucden. Sucden is not liable for any opinions expressed by the sender where this is a non-business email.
The contents of this e-mail do not constitute advice and should not be regarded as a recommendation to buy, sell or otherwise deal with any particular investment.
This message has been scanned for viruses by BlackSpider MailControl

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 28 14:24:14 2007

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.