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