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

Towards standardising mime-type support

From: Trent Apted <tapted_at_it.usyd.edu.au>
Date: 2005-03-29 08:18:55 CEST

Hi there, I've been a developer and CVS user for a long time and
recently did the switch to Subversion
[svn, version 1.1.3 (r12730)]. Some things bug be (being unable to move
things between repositories comes to mind), but overall I'm happy and it
is now unlikely that I'll go back to CVS (it was a close thing though).

I'm currently in the process of reading through the docs to get the most
out of Subversion. I came across the svn:mime-types property and my
immediate thought was, "Why don't I just use /usr/bin/file to set the
mime-type?" So I tried it out, but there are some issues:

When I run

$ file -bi something.c

(or .cpp, .h, .cc, etc.)

/usr/bin/file reports that the mime-type for C/C++ files is

text/x-c; charset=us-ascii

However, if I feed this to Subversion, it treats the file as binary. So,
that's fine, I'll drop the charset stuff, and things are mostly back to
normal, but the added information still appears to be meaningless to
Subversion. Also, trac did not understand the text/x-c mime-type and
refused to run the file through enscript, so I ended up deleting the
mime-type altogether. This is bad, because I can foresee a future
application that can take full advantage of such mime-type strings.

So perhaps, to future-proof the mime-types, the parsing should be able
to treat any string that fits the standard in a sane way .. even if it
just ignores some of it (like charsets).

Further, perhaps there should be a feature with support for
`/usr/bin/file -bi` --- "auto-auto-props" might be nice. The current
method doesn't really add much over the cvswrappers technique which
always seemed to be a big duplication of effort to me.

The trac problem is less urgent, I might bug those guys later..


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 30 05:48:34 2005

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.