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

Re: Newlines, preserving data, and multiple access paths

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-12-14 18:36:34 CET

Greg Hudson <ghudson@mit.edu> writes:

> 1. We can avoid irrevocably destroying data if we make sure all
> newline translations we do are reversible. A newline translation
> is reversible if there are no CRs or LFs in the file which aren't
> source-format newlines.

Sorry, what is a 'source-format newline'?

> Here is what I propose:
>
> * For now, we implement Ben's scheme, with the proviso that we never
> do a non-reversible newline translation. (This totally messes up
> Karl's poll because it didn't include Ben's scheme.) The
> repository gets a global format of LF.

OK, so you're advocating (like everyone else now) that it's okay to do
a 'reverse transform' when committing, provided our transforms are
Safe. That's a great turn of events! This was the huge Sticking
Point that differentiated your proposal from mine & Bruce's. I feel
like a major hurdle has been crossed.

So, given that we're implementing a transform-on-commit system, the
only clarification left is how metadata fits in. My & Bruce's systems
had slightly different notions how how metadata should work in
determining system behavior.

  * In my system, an EOL property defined how a file should look in
    the repository. The client was responsible for making sure that
    this style was always committed to the repository. If this
    property was non-existent, the client assumes it has a value of
    'LF'. Then there was a -second- property that enabled one to
    switch EOL conversion on/off per file. The absence of this second
    property can imply EOL is either on or off by default; I don't
    care which.

  * In Bruce's system, he had only one property - namely, the on/off
    switch. If the property was 'on', then a committed file would be
    reverse-transformed on commit, assuming that a transform had
    originally happened on checkout.

Bruce's system seems a tad more complicated to implement, since it
seems to require some kind of auto-detection of EOL style when a
text-base is first received from the server. And it also needs to
'remember' that a transform happened previously; either that, or
re-run the detection heuristic on text-base each time the working file
is committed.

Please correct me if I'm wrong. My brain is spinning, and I'm so
tired of reading/thinking about this issue. I just want to code
already. :-)

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