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

RE: Idea for dealing with text-file line endings

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-04-30 18:08:42 CEST

On Fri, 2004-04-30 at 10:52, Tim Peters wrote:

> 1. A Linux user adds a new text file and forgets to set eol-style.
>
> Anyone can fix it by setting the eol-style property after the
> fact.

Correct.

>
> If someone on Windows managed to get the \n style before eol-style
> was changed, what happens?
>
> A. Their working copy is out of date, and their next update
> will automatically repair it.

Correct. If somebody else adds the property, and the win32 user
updates, the line endings are fixed. Heck, even the win32 user can
commit the property, and *still* have the line endings fixed after the
commit finishes. No need to wait for someone else to fix it.

> 2. A Windows user adds a new text file (with \r\n line ends)
> and forgets to set eol-style. (I expect this one will be much
> more common in Zope projects than in Subversion development.)
>
> The file in the repository has \r\n line ends then.
>
> Someone trys to repair this by setting eol-style.

And as soon as that happens, the repository file becomes \n. That's
because svn has an internal convention: if a file has 'svn:eol-style ==
native", then the repository file is *always* \n, no matter what.

Once again, anybody can fix the property, and (1) the committer will see
the correct line endings immediately, and (2) those who update will get
correct line endings.

Basically, all the problems you're worried about don't happen. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 30 18:12:55 2004

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.