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

Re: any "must-have" hooks to implement on svn server?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Wed, 16 Jul 2008 16:06:01 -0500

On Jul 16, 2008, at 07:27, christian.peper_at_kpn.com wrote:
> I've been reading up on SVN for the last month and after trying CEE
> and
> SFEE (on demand), I decided to start simple and see where it'll
> lead us.
> I now have a svn 1.5 server up and running well, imported 100 or so
> old
> RCS files, and I'm slowly letting my co-workers use it. I plan to
> tweak
> and polish the server here and there while they work. :)
>
> My question:
> - which hooks or scripts are must-have on a day to day basis?
>
> I don't mean pre-commit or pre-lock in general, but who knows for a
> fact
> that using a pre-commit hook to test for X, Y and Z in a multi-user
> dev
> group working on several project is a good idea?
>
> I've seen the hook templates, read a few posts on the forum and
> various
> blogs, but while I agree that they contain potentially useful stuff, I
> have yet to see a collection of must-have tools, contribs or hooks
> for a
> subversion server. :)

Must-haves:

* post-commit: normalize commit messages so they always end with
exactly one newline (http://svn.collab.net/repos/svn/trunk/tools/hook-
scripts/log-police.py)

* post-commit: you probably want to email change notifications to a
list or somewhere (http://svn.collab.net/repos/svn/trunk/tools/hook-
scripts/mailer/)

* pre-commit: prevent committing a file whose name differs from
another in that directory only in case, since such a commit makes it
impossible to check the directory out on a case-insensitive
filesystem like the ones used by default on Windows and Mac OS X
(http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/case-
insensitive.py)

* pre-commit: prevent committing a file whose name would be
problematic on Windows (don't know a script that does this):
   * these filenames are illegal on Windows: CON, PRN, AUX, NUL, COM1
thru COM9, LPT1 thru LPT9, and any of these with any extension
   * a filename may not end with a period or space
   * a filename may not contain the characters < > : " / \ |

* pre-commit: I just found this script which prevents problems with
svn:keywords on binary files which sounds like a good idea (http://
svn.collab.net/repos/svn/trunk/contrib/hook-scripts/svn-keyword-
check.pl)

* Apache module: if you're serving your repository(ies) with Apache
you might want to prevent people from checking out whole swathes of
your repository which would put unnecessary load on your server and
waste bandwidth and your users' disk space probably (http://
svn.collab.net/repos/svn/trunk/contrib/server-side/mod_dontdothat/)

> And... if they are "must-have" or commonly implemented, why are
> they not
> included with the svn server by default?

Many of these are included in the Subversion source distribution. As
to why Subversion does not have these behaviors built-in, not all
users need to care about Windows or case-insensitive filesystems or
these other situations. Personally it seems to me that these should
be added to Subversion proper. But they haven't been.

---------------------------------------------------------------------
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-16 23:06:41 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.