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

RE: setting the EOL property throughout a repo?

From: Robert P. J. Day <rpjday_at_crashcourse.ca>
Date: Tue, 25 Nov 2008 08:18:55 -0500 (EST)

On Tue, 25 Nov 2008, Giulio Troccoli wrote:

> I've done a little test. I used dos2unix to change the EOL of a text
> file, set the svn:eol-style property to LF and commit. You can't
> have mixed EOL style when you set the property I seem to remember.
> All this on a Unix system.
>
> Then I change the EOL style with unix2dos but svn status did not
> report any changes.
>
> I'm not sure what this proves though. Maybe that once svn:eol-style
> is set Subversion doesn't care anymore about the actual EOL, because
> when you check the file out (or maybe even just an update) the EOL
> will be what the property says.

  i just did a test as well, and it does what i was hoping for.

1) take a non-propertied text file, "unix2dos" it to get <CR><LF> EOL
characters in it, use "svn diff" to see that, yes, they're there, and
commit that.

2) use "svn cat" on the repo itself to verify that, yes, it got
committed with the <CR><LF> EOLs. so far, so good.

3) check my working copy and, not surprisingly, the <CR><LF> EOLs are
still in the file in my working copy.

4) "svn propset svn:eol-style LF" that file in my working copy, verify
the property difference with "svn diff" and commit. commit succeeds.

5) "svn cat" the file in the repo to see that, sure enough, the EOLs
have been reduced to simple <LF>s. which is what i was after.

6) note, with some surprise, that the file in my working copy has
*also* been reduced to simple <LF> EOLs. curious. i would have
thought that i would have had to update first but i'm good with that.
so it looks like i can get the effect i want without having to resort
to hook scripts.

  does all of that make sense?

rday

--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.
http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-11-25 14:20:04 CET

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.