[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: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Wed, 8 Sep 2010 11:58:56 -0500

On Sep 8, 2010, at 07:45, Campbell Allan wrote:
> On Wednesday 08 Sep 2010, Csaba Raduly wrote:
> 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

I understood this was the client's responsibility. So while the official Subversion client does this, and presumably the reputable other clients that use the Subversion libraries do this, there is nothing on the server side that enforces that this is the case. I know it is possible to get files with the wrong eol style into the repository by loading a dump file; maybe it is also possible using language bindings. So checking in a pre-commit hook script that line endings of files with svn:eol-style set are indeed LF seems like a smart idea to me.
Received on 2010-09-08 19:00:12 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.