You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Luigi Bai <lp...@focalpoint.com> on 2004/02/04 17:59:33 UTC

mime-types enhancement

I'd like to propose an extension to the heuristics SVN uses to determine
the mime-type of a new file. In particular, I'd like to propose a
.subversion/mime-mappings file with the following format:

     <mime-mapping>
         <extension>abs</extension>
         <mime-type>audio/x-mpeg</mime-type>
     </mime-mapping>
     <mime-mapping>
         <extension>ai</extension>
         <mime-type>application/postscript</mime-type>
     </mime-mapping>
     <mime-mapping>
         <extension>aif</extension>
         <mime-type>audio/x-aiff</mime-type>
     </mime-mapping>
     <mime-mapping>
         <extension>aifc</extension>
         <mime-type>audio/x-aiff</mime-type>
     </mime-mapping>

Extensions are compared without case sensitivity.

Thanks;
Luigi

-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#








---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: mime-types enhancement

Posted by Juanma Barranquero <jm...@wke.es>.
On Wed, 04 Feb 2004 12:20:39 -0600
Luigi Bai <lp...@focalpoint.com> wrote:

> The example in the config 
> file doesn't seem correct, as it seems to try to set svn:mimetype 
> instead of svn:mime-type.

That was fixed two months ago, but if you already have a .subversion (or
%APPDATA%\Subversion) directory, it won't be changed. If you don't have
local modifications to the config files, delete the directory and run
subversion again.

                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: mime-types enhancement

Posted by Luigi Bai <lp...@focalpoint.com>.
You're right; I can use auto-props for that. The example in the config 
file doesn't seem correct, as it seems to try to set svn:mimetype 
instead of svn:mime-type. And despite my original post, I'd actually 
*prefer* a repository-wide mapping instead of per-user; just for myself, 
I need to keep the .subversion/ files on my laptop in synch with the 
ones on the server. Never mind what other people check in.

Of course, with per-user config, it applies to *all repositories* I 
connect to. So, to get the best of both worlds, how about both? If so, 
per-repository should override per-user, I think.

Luigi

Brian. W. Fitzpatrick wrote:

> On Wed, 2004-02-04 at 11:59, Luigi Bai wrote:
> 
>>I'd like to propose an extension to the heuristics SVN uses to determine
>>the mime-type of a new file. In particular, I'd like to propose a
>>.subversion/mime-mappings file with the following format:
>>
>>     <mime-mapping>
>>         <extension>abs</extension>
>>         <mime-type>audio/x-mpeg</mime-type>
>>     </mime-mapping>
>>     <mime-mapping>
>>         <extension>ai</extension>
>>         <mime-type>application/postscript</mime-type>
>>     </mime-mapping>
>>     <mime-mapping>
>>         <extension>aif</extension>
>>         <mime-type>audio/x-aiff</mime-type>
>>     </mime-mapping>
>>     <mime-mapping>
>>         <extension>aifc</extension>
>>         <mime-type>audio/x-aiff</mime-type>
>>     </mime-mapping>
>>
>>Extensions are compared without case sensitivity.
> 
> 
> This sounds an awful lot like auto-props, which are implemented but not
> documented.  Look in the config files in your ~/.subversion directory
> for more information.
> 
> -Fitz
> 
> 

-- 
<A HREF="http://www.focalpoint.com/">Home Page</A>
education is what's left after what is learned is forgotten.
                                -- b f skinner
Luigi P. Bai                   Focal Point Software, Inc.
lpb@focalpoint.com             3701 Kirby Drive, Suite 512
turning data into information  Houston, TX   77098
                                (713) 215-1600 x 33#



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: mime-types enhancement

Posted by "Brian. W. Fitzpatrick" <fi...@red-bean.com>.
On Wed, 2004-02-04 at 11:59, Luigi Bai wrote:
> I'd like to propose an extension to the heuristics SVN uses to determine
> the mime-type of a new file. In particular, I'd like to propose a
> .subversion/mime-mappings file with the following format:
> 
>      <mime-mapping>
>          <extension>abs</extension>
>          <mime-type>audio/x-mpeg</mime-type>
>      </mime-mapping>
>      <mime-mapping>
>          <extension>ai</extension>
>          <mime-type>application/postscript</mime-type>
>      </mime-mapping>
>      <mime-mapping>
>          <extension>aif</extension>
>          <mime-type>audio/x-aiff</mime-type>
>      </mime-mapping>
>      <mime-mapping>
>          <extension>aifc</extension>
>          <mime-type>audio/x-aiff</mime-type>
>      </mime-mapping>
> 
> Extensions are compared without case sensitivity.

This sounds an awful lot like auto-props, which are implemented but not
documented.  Look in the config files in your ~/.subversion directory
for more information.

-Fitz


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: mime-types enhancement

Posted by "C. Michael Pilato" <cm...@collab.net>.
Luigi Bai <lp...@focalpoint.com> writes:

> I'd like to propose an extension to the heuristics SVN uses to determine
> the mime-type of a new file. In particular, I'd like to propose a
> .subversion/mime-mappings file with the following format:

The only "heuristics" that Subversion uses is a check for NULL bytes
and ratio of upper-to-lower ASCII bytes in the first block of
data > 85%, and that only to say "this thing is binary
(application/x-octet-stream) or not".  Auto-props support in the
configuration area does what you're talking about (and more).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org