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.

Reply via email to