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

RE: Detecting CR eol

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Wed, 8 Sep 2010 14:03:29 +0100

> I don't believe you have to go to so much trouble in the
> pre-commit hook. If you have set the svn:eol-style property
> then subversion will ensure the file has those line endings
> on checkout and update them when committing into the
> repository. So all the hook needs to do is check for the
> property. See the book for more details
>
> http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advan
> ced.props.special.eol-style

I'm not sure. Are you saying that if I set the svn:eol-style property to LF, for example, and my file has at least one line ending with CRLF, then Subversion will reject the commit? The book doesn't quite say that, and that wasn't my understanding on how the property works.

> I'd also normally expect the line ending style to be set to
> native so windows and unix users don't trample the existing
> incompatible line endings. The only reason perhaps for
> checking each file explicitly would be if there was something
> else needing the files to be in a particular format, ie
> releases to customers from a developer machine rather than an
> official build server that would check out a clean copy each time.

The requirement, to have LF, came a long time ago. I remeber having problems with svn:eol-style set to native. I think Subversion did not checkout the files with the correct EOL based on the platform, but maybe that was because the files were actually being committed with mixed EOLs.

G

Linedata Limited
Registered Office: 85 Gracechurch St., London, EC3V 0AA
Registered in England and Wales No 3475006 VAT Reg No 710 3140 03
Received on 2010-09-08 15:04:08 CEST

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.