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

Re: fixing files committed with wrong eol-style

From: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Tue, 13 Jul 2010 07:22:39 -0400

On Tue, Jul 13, 2010 at 3:46 AM, Giulio Troccoli
<Giulio.Troccoli_at_uk.linedata.com> wrote:
>>  Hello,
>>
>> Without the "svn:eol-style" property any file content is
>> considered as binary.
>> At that point, checkouted files on Windows and Linux have "CR-LF" eol.
>
> ASAIK this is not true. Subversion has a clever way to tell whether a file is text or binary by looking at the file itself. I believe that you can "trick" Subversion by setting svn:mime-type, although I'm not sure why someone would want to treat a binay file as text or vice-versa.

Subversion supports the use of "pre-commit hooks", that can auto-set
such properties based on the file name. I usually personally consider
it a bad idea: changing EOL behind my back as I switch from system to
system is nasty, especially when my files are on a shared directory
that may be used on both Windows and UNIX style systems.

It's often most effective to have a project or site policy. "No
Windows-EOL files" works well for me, and the dos2unix and unix2dos
files available on UNIX systems and withing CygWin for Windows work
well. Mind you, it gets even more fun for MacOS....
Received on 2010-07-13 13:23:21 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.