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

Re: setting svn:eol-style=LF and svn:mime-type=application/xml

From: Ben Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Fri, 4 May 2012 13:32:39 +0200

On Thu, May 3, 2012 at 5:35 PM, Dmitry Pavlenko <pavlenko_at_tmatesoft.com> wrote:
> SVN properties setting depends on the order.
> (branches/1.7.x, r1330327)
>
> I.e. if I set svn:eol-style before svn:mime-type, everything is ok. Otherwise there can be a
> problem. What behaviour is expected: failure in both cases or success in both of them?
>
> svn:eol-style before svn:mime-type:
>
> $ svn propset svn:eol-style LF file1.xml
> property 'svn:eol-style' set on 'file1.xml'
>
> $ svn propset svn:mime-type application/xml file1.xml
> property 'svn:mime-type' set on 'file1.xml'
>
> vice versa:
>
> $ svn propset svn:mime-type application/xml file2.xml
> property 'svn:mime-type' set on 'file2.xml'
>
> $ svn propset svn:eol-style LF file2.xml
> svn: E200009: File '/tmp/test-co/file2.xml' has binary mime type property

Use text/xml for XML files that you want treated as text, where
setting svn:eol-style makes sense and SVN will attempt to merge
contents.  Use application/xml for xml files you want treated as
binary.

We generally use text/xml for "human-readable" XML (e.g. Maven pom.xml
files, docbook files or XSLTs). Machine generated XML (e.g. a Rational
Modeler file) can not generally be merged sensibly, so we use
mime-type application/xml for those.

// ben
Received on 2012-05-04 13:33:11 CEST

This is an archived mail posted to the Subversion Dev mailing list.