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

RE: Poll: do we really need newline conversion?

From: Billy Tanksley <btanksley_at_hifn.com>
Date: 2001-12-11 20:44:51 CET

From: Roman Neuhauser [mailto:neuhauser@mobil.cz]
> From: Karl Fogel <kfogel@newton.ch.collab.net>

> I don't think the issue is notepad displaying LF files as a single
> line with some strange hollow squares instead of newlines. But no
> EOL conversion could bite you in quite a few situations... IIRC
> UltraEdit can be set up to display LF files properly, and convert
> them to CRLF when you write them out. Check out, modify a single
> line, and commit. Oops, the diff is somewhat longer than
> expected...

The problem here seems to be almost unanimous: people don't like long diffs.
Well, I can certainly agree with that. But IMO the right thing to do isn't
to add a feature which will trash the diff; there may be reasons for the
change. Instead, add a feature which will express the same diff in a
different form.

Perhaps add a search and replace to diff and patch, for now limited to
newlines. If newlines start changing, but none of the text changes, don't
emit line based diffs (especially since the standard diff format doesn't
_really_ define odd line ending changes; emit a find-and-replace diff which
starts on the current line, and when the newline change ends, emit a
find-and-replace ending marker.

This way you get everything: short diffs, AND line ending control.

> .ds[pw] files shouldn't undergo EOL conversion, but should be
> "diffable", IMO.

In other words, patchable but not converted. I think that's a good default,
unless something in the file makes patching hard -- for example, embedded
control characters, zeros, and extremely long lines.

> But I think that having these two features off by default,
> independent of each other, and maybe even independent of
> whether the file is "text" or "binary" would be the perfect
> solution.
> So... -0.5.

I'd like this too.

I think it's clear that line ending adaptation is a feature, not a bug; only
the lack of control CVS has is a bug. The question is, should this
particular feature go into svn right now, or should it wait?

-Billy

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