[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: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Tue, 25 Nov 2008 12:57:36 +0000

>

Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447

-----Original Message-----

> From: Robert P. J. Day [mailto:rpjday_at_crashcourse.ca]
> Sent: 25 November 2008 12:02
> To: Giulio Troccoli
> Cc: 'Subversion mailing list'
> Subject: RE: setting the EOL property throughout a repo?
>
> On Tue, 25 Nov 2008, Giulio Troccoli wrote:
>
> > > From: Robert P. J. Day [mailto:rpjday_at_crashcourse.ca]
>
> > > just want to verify that, if i want to set the UNIX-style EOL
> > > property on all of the text files in a source code repo (that is,
> > > all the .c,.cpp, .h, etc, etc files), the easiest way is just to
> > > run the appropriate "find" command and execute "svn propset" on
> > > each matching file? that *seems* like the obvious way, i just
> > > didn't know if there was something more clever or elegant.
> > > thanks.
> >
> > That's correct. Them you should also set the auto-prop for new files
> > and change the pre-commit hook to reject a commit when the
> > svn:eol-style property is not what you want. All this will ensure
> > that you will not have the same problem in the future.
>
> ok, this is undoubtedly a dumb question but here goes. at the
> moment, i have no access to customize the server end so i can't mess
> with any of the hooks (yet). with that limitation in mind (and i know
> we've discussed this before), what is the value in my setting that
> property on the text files and checking them in?
>
> more specifically, what *exactly* happens with files on which i've
> set that property? as in, how will it affect others who mess up their
> EOL characters, then try to commit such a file, if i haven't been able
> to make any mods to the hook scripts? is there any value at all? i'm
> more than happy to have those commits simply fail with at least a
> moderately informative error message since i've been whining
> constantly to people to stop screwing up their EOLs, so if it burns
> them, that might actually teach them a lesson. :-)
>
> so, once again, what is the effect on simply setting that property
> if nothing else is done? what happens at the time of commit behind
> the scenes? thanks.

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.

Giulio

---------------------------------------------------------------------
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 13:58:17 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.