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

Re: line-ending conversion and keyword substitution

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2001-12-13 15:27:40 CET

On Thu, 2001-12-13 at 05:08, Greg Stein wrote:
> 1) the repository receives consistent line endings, which assists all the
> various access mechanisms to the data that resides there

Yes and no. Each file has a consistent line ending, but different files
have different line endings depending on how they started out.

> 2) people seem to say "but the repos shouldn't munge what is committed."
> well, the *repository* doesn't munge anything. The client does any
> necessary work. It is simply committing a canonical version.

"The repository shouldn't munge what is committed" is an aesthetic
design argument. "Subversion shouldn't munge what is committed" is a
safety argument. You can't substitute the former for the latter.

> 5) if a file has "native" type, then it goes into the repos as CR style
> (defined as the canonical repos style). this may imply some conversion
> from non-CR clients (win, mac).

Er, this isn't Bruce's system at all, this is Ben's system. Disregard
my response to point (1), but you lose any data safety advantages
Bruce's system has over Ben's system (as well as the advantages my
system has over both systems).

(Also, Unix uses LF, so I think you meant to say "LF style" here. Using
CR style makes you consistent with the Mac, except that MacOS is
switching away towards the Unix style with MacOS X, so that's not a good
thing to be consistent with.)

> 6) note: CR, LF, CRLF are a lot like "none" in that no translation ever
> occurs. it is debatable whether they need to occur. the mime type tells
> us these are text files, thus subject to proper application of a context
> diff.

Um, yes, you do need to do translation. If I check out an LF file on
Windows and edit it with an editor which replaces all the newlines with
CRLF, they need to be translated back to LF.

> I consider Greg Hudson's proposal to be quite nice, but for the flip-flop
> and the resulting "varying view" for other tools.

Perhaps DeltaV needs to consider the handling of line endings in text
files. Without protocol guidelines, simply enforcing an LF style in the
repository for native-style text files will make Unix DAV tools happy,
but isn't terribly likely to make Windows DAV tools happy.

I'm not at all convinced that we should throw away data safety
guarantees for the sake of helping tools which won't necessarily work
anyway. (Plus, we'd be letting the network protocol drive Subversion
design to a greater extent than I'm comfortable with.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:52 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.