[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-11 20:18:18 CET

On Mon, 2001-12-10 at 18:36, Ben Collins-Sussman wrote:
> - Sub-Ramification: svn_wc_text_modified_p() is going to have
> to intelligently overlook these differences when comparing
> text-bases with working files that have been 'converted'.

> - Sub-Ramification: the conversions need to happen at the right
> times, so that our calls to 'diff' and 'patch' work
> correctly.

Essentially, we have to transform text-base every time we want to
compare it with the working copy file (is-modified, diff, patch), except
when we are producing binary diffs for a commit.

> (Latest proposal by Branko, agreed to by Ben, Karl and Greg Hudson:) ]

Actually, no, this proposal doesn't satisfy my principle, because you
are transforming file contents before checkins. (I'm okay with
transformation after checkin on what's in the working directory; that's
necessary for keyword substitution.)

Your reason for wanting pre-commit transformation is that you want to
have a uniform line ending style in the repository across all versions
of a file. The consequences of this decision are two-fold:

1. The repository diffs become smaller because you don't have gratuitous
newline diffs every time a Windows developer checks in the file after a
Unix developer did and vice versa.

2. If you accidentally commit a binary file with newline substitution
turned on, you irrevocably destroy the contents of the file.

I don't think that's a very good tradeoff, at least for a feature which
is on by default (for files we think are text files).

I guess it's worth noting that we get property #1 if we don't do newline
translation... if everyone uses editors which handle multiple newline
conventions and don't normalize newlines to the native style.
Unfortunately, that's not every editor.

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