[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: Les Mikesell <lesmikesell_at_gmail.com>
Date: Wed, 23 Feb 2011 20:27:18 -0600

On 2/23/11 8:03 PM, Nico Kadel-Garcia wrote:
>> 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.

There are lots of ways to cause trouble. My opinion is that if it hurts, don't
do it. And that will hurt.

> 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.

More things that hurt - and to avoid. But setting eol-style native and using
normal, native tools on each OS isn't one of them.

> 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
> change.

Any time you use dos2unix or the like it is going to be a change in every line
and will screw up any concept of version differences. If svn does it
internally, you don't have that problem.

    Les Mikesell
Received on 2011-02-24 03:27:55 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.