> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c_at_ryandesign.com]
> Sent: Thursday, July 24, 2008 11:18 PM
> Subject: Re: any "must-have" hooks to implement on svn server?
>
[schnipp]
> > Why not write a pre-commit hook that checks if the file
> type is some
> > text file, aka not binary, and set the eol-style to native
> and be done
> > with it? No bothering users with client=side config that
> they forget
> > to update, save, maintain or even apply at all. You also
> don't need to
> > maintain the hooks when new file types get added that you haven't
> > supported yet.
>
> You cannot always guess whether a file should be treated as
> text or binary. For example, Subversion usually guesses
> (incorrectly) that a PDF file is a text file. There may be
> other types of files which seem to be text but where the line
> ending style is relevant to the program that reads them.
>
> Also, you cannot change a transaction in progress in a hook script.
> The only thing you could do is commit a second revision right
> after to add a forgotten svn:eol-style property. This has the
> effect that the developer's working copy is immediately out
> of date after committing a new file addition. This would
> rightly be confusing to the developer. It also adds
> complexity to the hook script as it now has to manage its
> very own working copy. And what if that working copy breaks?
> Then the hook script stops working, possibly blocking all
> commits until it's fixed.
>
> It is better to do it the normal Subversion way: educate the
> developer how to set up auto-props correctly, and install a
> pre- commit hook script to enforce it.
thanks, Ryan! I'm so glad I asked the questions. :)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-28 14:32:45 CEST