[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2001-12-14 23:25:34 CET

On Fri, 2001-12-14 at 15:48, William Uther wrote:
> --On Friday, 14 December 2001 1:16 PM -0500 Greg Hudson <ghudson@MIT.EDU>
> wrote:

> > If newline-style is LF, CR, or CRLF, translate <native newline style>
> > -> <requested newline style>. If we notice any CRs or LFs which aren't
> > part of a native-style newline and aren't part of a requested-style
> > newline, abort the commit. If the commit succeeds, apply the <native
> > newline style> -> <requested newline style> translation to the working
> > copy as well, so that it matches what we would get from a checkout of
> > the new rev.
>
> I don't think this preserves reversability. If a file contains BOTH
> <native-style newline> and <requested-style newline> then you neet to
> abort. If you translate just <native-style newline> then you can't undo
> the transformation - you don't know which newlines need to be untransformed.

This particular transform (for files marked CRLF, CR, or LF) is not
reversible. See where I said:

  We probably don't have to worry so much about data safety for
  these files since a particular, odd behavior has been specified for
  them.

However, let's add a possible variation to my proposal, for those who
are still uncomfortable with data-destroying transformations applied to
such flies:

  Variation 5: If the file is marked CRLF, CR, or LF, we translate
<native-style newline> to <requested-style newline> during commit, and
abort the commit if we notice any kind of mixing of newline styles.
(Can also combine with variation 1.)

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