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

Re: eol style differences

From: <brane_at_xbc.nu>
Date: 2003-03-12 12:49:46 CET

Quoting Philip Martin <philip@codematters.co.uk>:

> "Sander Striker" <striker@apache.org> writes:
>
> > > Of course, it sounds like now, you can successfully "svn diff",
> > > but it won't tell you where your problem is.
> >
> > Right, so we need to do the translations the other way around and
> > compare in working copy style. Anyone care to make that change?
> > Or file an issue?
>
> Using working copy style might be better most of the time (I'm not
> really convinced but I'll just assume it is for now), but it's not
> clear to me that it is always better. Two problems come to mind.
> First, suppose one is comparing two different revisions, using '-rX'
> or '-rX:Y', then there will be two svn:eol-styles and they may not be
> the same. Does each revision of the file get translated according to
> it's own svn:eol-style, or does one svn:eol-style get used for both?

I meand to reply that "Of course you have to use the eol-style that was in force
at the file's revision!"

Then I wondered what happens if you do the same with svn:keywords, and started
saying some quite unprintable things.

I'd propose two things: a) always use the svn:eol-style that's on the version
your'e looking at; and b) remove all keytword expansions when doing diffs. Our
internal diff lib can do that on-the-fly; for an external diff, we have to munge
the WC file, too. Sigh.

> The second problem is more to do with how svn:eol-style works in
> general. It is possible to have a repository format file with CRLF
> line-endings and svn:eol-style set to native.

That's not how svn:eol-style works; that's how svn:eol-style *does't* work. It's
a bug, right?

Oh. What if you change svn:eol-style on a URL? Wheee...

> On Windows a repository
> format comparison should show every line changed, a working copy
> comparison should show no change. Which is correct?

Actually, if you convert the pristine copy, you'll see no change on Unix, too.
Which is bad, because then you'll commit the "no change" and be delightfully
surprised at having changed every line ending in the repo. Oh, duh.

> Perhaps the solution is that whichever format we choose to use for
> diff, a command line flag should be available to cause the other
> format to be used.

I agree, that flag is useful for other things, too (e.g., svn cat)

    Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 12 12:50:36 2003

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.