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

Re: Mixed Unix-Windows development

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Sun, 17 May 2009 09:59:55 -0500

On May 17, 2009, at 06:14, Alexey Ivanov wrote:

> Andrey,
>
>> To further clarify this moment, the svn:mime-type must be text/
>> <whatever>
>> for svn:eol-style to affect anything.
>> http://svnbook.red-b%e2%80%8bean.com/nightly/en/s%e2%80%8bvn-
>> book.html#svn.adv​anced.props.special.​mime-type
>> Look for the "Warning" block.

In my experience, Subversion will not let you set svn:eol-style if
the file is considered binary (by virtue of its svn:mime-type). Example:

$ svn propset svn:eol-style native foo.png
svn: File 'foo.png' has binary mime type property
$

> I think, that this could be some of my cases. Since I've trouble to
> attach mime-types-file in the Subversion config,
> mime types for files, with which I've worked, could be arbitrary or
> not set at all.

The mime types won't be arbitrary unless you've set them that way.

When you add a file, Subversion sets the file's mime type to whatever
your auto-props say to set it to. If you haven't defined auto-props
for this type of file, then Subversion sets the mime type to
application/octet-stream if it believes it to be a binary file,
otherwise it leaves the mime type blank and treats it as a text file.

If you somehow managed to set svn:eol-style on a binary file (perhaps
by loading a dumpfile, or by using the language bindings), I think
Subversion would happily convert the line endings of the file and
thus corrupt it. So you definitely should not attempt to set svn:eol-
style on a binary file.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-17 17:01:45 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.