I have strange error with svn
client on Linux.
I would like to add test.xml
file to repository. This file is standard XML text file with only Latin characters (no BOM) and with Linux end-of-line (LF
only). But my svn
client fails with:
[mn@mn testy]$ cat test.xml
<?xml version="1.0" encoding="UTF-8"?>
<Test>test</Test>
<Test>89012345678901234</Test>
[mn@mn testy]$ file test.xml
test.xml: XML document text
[mn@mn testy]$ svn add test.xml
svn: E200009: Can't set 'svn:eol-style': file '/home/mn/testy/test.xml' has binary mime type property
The same operation works on Windows environment. On both I have configuration with auto-props:
*.xml = svn:eol-style=native
On both I have svn, version 1.8.10 (r1615264)
.
I can workaroud it:
add svn:mime-type=text/xml
into auto-props, so it looks like:
*.xml = svn:mime-type=text/xml;svn:eol-style=native
svn add
with --no-auto-props
option and then use svn propset
But I would like to do it by simply adding file.
Why Subversion client on Linux detect this file as binary?
Not a real solution, but some remarks that may help:
With Subversion 1.8 on the client, you have the so called Repository Dictated Configuration, so the following should work under all circumstances:
svn:auto-props
with the value *.xml = svn:mime-type=text/xml;svn:eol-style=native
.xml
, Subversion should add as property to the file svn:mime-type
and svn:eol-style
. There should be no magic involved to see if the file is binary, and to have set the mime-type to something like text/*
should ensure that the file is not interpreted as a binary file.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With