On May 28, 2009, at 16:31, petermity wrote:
> Using Subversion/TSVN 1.6.1 under Windows XP.
> I would like Subversion to set mime-types automatically.
> In config I have set mime-types-file to a mime.types file from
> Apache (with line-ends converted).
> All of the extensions in that file are lower case.
> If I add a file.jpg, it works, I get svn:mime-type of image/jpeg.
> If I add a file.JPG, it doesn't work, I get svn:mime-type of
> I'd really like to use the Apache file as-is.
> Is there some way to tell Subversion to match the extensions in a
> case-insensitive manner?
I don't know. I had not been aware of mime-types-file; looks like
this option is new for subversion 1.5. Prior to this, the only way to
set mime types automatically was to use the auto-props section in the
subversion config file. My config file is still set up in this way,
containing rules such as these:
*.[Cc][Ss][Ss] = svn:eol-style=native;svn:mime-type=text/css
*.[Gg][Ii][Ff] = svn:mime-type=image/gif
*.[Hh][Tt][Mm] = svn:eol-style=native;svn:mime-type=text/html
*.[Hh][Tt][Mm][Ll] = svn:eol-style=native;svn:mime-type=text/html
*.[Jj][Pp][Ee][Gg] = svn:mime-type=image/jpeg
*.[Jj][Pp][Gg] = svn:mime-type=image/jpeg
And so on. Note the use of glob expressions at the beginning to match
extensions case-insensitively. I know subversion treats these rules
case-sensitively otherwise. I don't know about its handling of mime-
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-29 00:24:47 CEST