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

Re: information about storing text-only files

From: Frodak <frodak17_at_yahoo.com>
Date: 2007-02-05 19:09:59 CET

--- Jeff Smith <jsmith@robotronics.com> wrote:

> On Friday 02 February 2007 17:00, Erik Huelsmann
> wrote:
> [...]
> > [Frodak]> Unfortunately, this seems to be where
> subversion text
> > > handling breaks down. Once it converts from one
> > > Normal Form to another, the diff shows that
> every line
> > > is different.
> > >
> > > I would think, ideally, that it would show the
> > > property change only as it is still a text file
> and
> > > only the EOL style has changed.
>
> I'm not sure what this means because it appeared
> that svn:eol-styles
> was meant to solve the very problem where Frodak
> said it "breaks
> down"... svn has a design flaw? Do I misunderstand
> what Frodak just
> said is wrong:
>
> [example text imported with svn:eol-style=native]
> this is\r
> plain text\r
>
> [translated normalized in repository]
> this is\n
> plain text\n
>
> [check out to Win]
> this is\r\n
> plain text\r\n
>
> [now using `svn diff` shows every line changed?]

You are only looking at the working copy, and not the
normalized form that is stored in subversion.

Check out the file, and change the property from
native and CRLF. Then do a diff, and it shows that
property is different.

Then check in the file, once that happens it'll
renormalize the file.

Then do a diff between the file when it was native and
then when it was CRLF, and you'll see that every line
has changed.

So yes, I do think that this is where subversions
handling of text files breaks down. I think the
desired behavior of a diff between 2 files where the
svn:eol-style is different is to show you the change
in the property and any changes in content (but not
because the EOL changed). Like you get if you use
"diff --strip-trailing-cr" when comparing a unix file
to a dos file.

>
> > But subversion doesn't know about text files :-)
> It only knows it
> > needs to do certain transforms on special events
> in order to make
> > sure the user has the right eol style in his
> working copy. Nothing
> > more.
>
> I'll ignore that you contradict yourself, but, is
> there some
> unmentioned aspect of a "text file" that svn does
> not know about?
> We've already acknowledge that diff shows diff
> context, and that svn
> even supports svn:eol-style completely relying on
> the strict rules of
> a text file.

I'll ignore the fact I'm not the author of the above quote.

 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 5 19:10:40 2007

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

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