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

Re: ^M Appends to every line?

From: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Wed, 23 Feb 2011 21:03:13 -0500

On Wed, Feb 23, 2011 at 8:48 PM, David Chapman <dcchapman_at_acm.org> wrote:
> On 2/23/2011 4:44 PM, Nico Kadel-Garcia wrote:
>> On Wed, Feb 23, 2011 at 11:39 AM, Les Mikesell<lesmikesell_at_gmail.com>

>>> Short version: set the svn:eol-style property to native on the files
>>> where
>>> you want subversion to manage line endings.  Your client may have a list
>>> of
>>> file suffixes where this would be set automatically.
>> But in general, avoid it. If you're in a mixed platform environment,
>> and you are tweaking files back and forth in end-of-line settings when
>> you check them out in UNIX versis checking them out in Windows, you
>> are in for a *world* of hurt. This is a source of enormous confusion
>> for programmers when it works right, on one system, but not on the
>> other due to local re-writing.
>> If you're on the UNIX or Linux sides, the "dos2unix" and "unix2dos"
>> utilities are available with almost every distribution. For Windows,
>> there are other tools, including the same tools under CygWin.
> Uh, no.  Use of "svn:eol-style" avoids a world of hurt - programmers do not
> have to run a script *every* time they check out a file.  Requiring users to
> run a script to fix line endings in every sandbox is a recipe for disaster.
> "dos2unix" and "unix2dos" are precisely the kind of local rewriting you want
> to avoid.
> My two cents (and one million lines of code) worth...

Not when the same working working copy is accessible from both Linux
or UNIX, and Windows, as is commonplace in a mixed platform
environment. If your working copies on each platform are distinct, you
should be able to get away with it. But hit the same checked out
Windows repository with TortoiseSVN and CygWin, and suddenly you're in
a world of hurt again with the non-binary handling of EOL. Some text
editors will autoparse it for you, but it can get extremely nasty, and
I've had to clean up some serious messes this way.

The messes are aggravated by the lack of the "obliterate" function, to
entirely strip out erroneously configured file additions, and the
difficulty running "diff" operations against files that have been
stored and had their EOL settings updated and their contents revised.
It really messes with "svn diff" operations before and after the
Received on 2011-02-24 03:03:42 CET

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.