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

Re: EOL Check Hook Script?

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Tue, 10 Mar 2009 01:04:17 -0500

On Mar 9, 2009, at 18:12, Bob Proulx wrote:

> Does anyone have a hook script that they have already written that
> will check that the eol convention hasn't changed with a commit and
> will reject it if it has changed?
>
> On a project I am working on in a mixed environment everyone has
> agreed that setting the right eol convention in their editor is easily
> done. But it is also easily forgotten too. If we had a hook script
> to check for this case then it could prevent commit accidents. I am
> aware of setting eol-style to native but since the working copy files
> are different than the target files (e.g. md5sums, tarballs, etc.) I
> would rather avoid doing it that way if possible.

I didn't understand your reason for not wanting to use the existing
eol enforcement technology that Subversion already has (setting
svn:eol-style).

I would suggest that you set svn:eol-style to whatever value you like
best (be that native or LF or CRLF) on all files that need eol
enforcement. On each client, you set up auto-props to automatically
set that property on those types of files, by filename extension. And
in the server's pre-commit hook, you check that all committed files
with whatever filename extensions do have the property set, and if
not, exit and tell the user to set the property.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1301323

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-10 07:05:11 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.