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

RE: Re: How to get rid op binary mime-type on a text file

From: Ron Romero <Ron.Romero_at_troux.com>
Date: 2007-11-13 17:44:40 CET

> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com]
> Sent: Monday, 12 November 2007 5:16 PM
> To: Marcel Loose
> Cc: users@subversion.tigris.org
> Subject: Re: How to get rid op binary mime-type on a text file
> On Nov 9, 2007, at 04:44, Marcel Loose wrote:
> > Recently, we've migrated our CVS repository to Subversion. I've used

> > cvs2svn-2.0 to do this job. One of the things I've noticed is that I

> > cannot do a "svn diff" on any of my shell scripts. When converting
> > I've told cvs2svn to use /etc/mime.types to get the correct
> > mime-types. As a result, my *.sh files now have the following
> > properties:
> > svn:executable : *
> > svn:mime-type : application/x-shellscript
> >
> > This looks good. However, the problem is that Subversion now treats
> > shell script as being binary. So when I try to get a diff to a
> > previous revision I get the following error:
> > Cannot display: file marked as a binary type.
> > svn:mime-type = application/x-shellscript
> >
> > How can I fix this? I've read something about creating your own
> > ~/.subversion/config file. So, I've added the line *.sh =
> > svn:mime-type=text/x-sh;svn:eol-style=native;svn:executable
> > to the [auto-props] section, and enabled auto-props but that doesn't

> > help. I guess this only works for newly added files, right?
> Correct. Auto-props are only for newly-added files.
> There is a script you can use to apply your new auto-props
> definitions after the fact. See this previous message in which I
> point out the original svn_apply_autoprops.py and a rewritten
> version of that script:
> http://svn.haxx.se/users/archive-2006-01/0485.shtml
> > Could you please help me out.
> You will have to set the svn:mime-type property of each file to
> text/ plain or something else that begins with "text/". If you feel
> that Subversion should handle files with the mime type
> "application/x- shellscript" as text, you could file an enhancement
> request in the issue tracker.

Um, doesn't this sound a little wonky? There's a magic "binary"
property that subversion figures out heuristically. In most other
things, Subversion is pretty good at exposing its magic. It seems to me
that it should be a proper property, something like svn:binary . Then
subversion could continue to default it, but users could set it with
setprop and auto-props.

Does that sound reasonable? If I'm not completely off base, I'll enter
a feature request for it.

Ron Romero
Troux Technologies
cell: 512-809-1162
IM: RonZRomero

Nothing is wholly good or wholly bad - except Twinkies.

This message may contain confidential information. If you have received this e-mail in error, do not use, copy or distribute it. Do not open any attachments. Delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Nov 13 17:49:17 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.