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

RE: MIME types extension matching is case-sensitive

From: Johan Corveleyn <johan.corveleyn_at_uz.kuleuven.ac.be>
Date: Fri, 29 May 2009 13:48:43 +0200

> > This glob expression syntax is a bit of a bummer, especially on
> Windows
> > where one typically wants case insensitivity.
> >
> > Here's a way to deal with it: generate the auto-props section from a
> > proto-auto-props file that uses a simplified syntax for case-
> insensitive
> > globbing.
> >
> > Example:
> >
> > *.{doc} svn:needs-lock=yes;svn:mime-type=application/vnd.ms-word
> >
> > translates to
> >
> > *.[Dd][Oo][Cc] svn:needs-lock=yes;svn:mime-type=application/vnd.ms-
> word
> >
> > A very simple Perl filter script is attached.
>
> Why shouldn't Subversion do case-insensitive matching itself, by
> default?
> Does anyone know whether the current behaviour is by design or whether
> it was just an oversight?
>
> I mean, there isn't any good reason why .jpg and .Jpg and .JPG should
> not match to the same mime-type, right?
>
> Stefan

Has anyone confirmed that this is indeed SVN's behavior for auto-props?
As far as I can see, this is not the case (SlikSvn 1.5.5 on Windows XP). I.e. the matching of extension happens case-insensitively (at least on Windows).
See output below:

-------------------
$ tail config
# *.png = svn:mime-type=image/png
# *.jpg = svn:mime-type=image/jpeg
# Makefile = svn:eol-style=native
*.java = svn:eol-style=native
*.txt = svn:eol-style=native
*.xml = svn:eol-style=native
*.xsl = svn:eol-style=native
*.properties = svn:eol-style=native
*.props = svn:eol-style=native
*.jnlp = svn:eol-style=native
*.sql = svn:eol-style=native

$ echo test > mytest.java

$ svn add mytest.java
A mytest.java

$ svn pl -v mytest.java
Properties on 'mytest.java':
  svn:eol-style : native

$ echo test > mytest2.JAVA

$ svn add mytest2.JAVA
A mytest2.JAVA

$ svn pl -v mytest2.JAVA
Properties on 'mytest2.JAVA':
  svn:eol-style : native

$ echo test > mytest3.jAvA

$ svn add mytest3.jAvA
A mytest3.jAvA

$ svn pl -v mytest3.jAvA
Properties on 'mytest3.jAvA':
  svn:eol-style : native

-------------------

Now, I don't know about using the mime-types feature (I don't use that), but for auto-props there is no issue AFAICS.

Regards,
Johan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2356742

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-29 13:49:43 CEST

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.