[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: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 16 Jul 2008 15:58:07 -0400

Must have? I can't say anything is must have. A security hook is the
most requested, but I can imagine many small sites don't really have a
need for one.

The most popular hooks are:

* Some sort of permissioning hook. Does this particular user have
permission to make changes in that file?
* Some sort of file watching hook: Tell this user whenever a
particular file gets changed.

I wrote my own hook for the first one because I didn't like the
original hook that came with Subversion. However, the new python
version of the hook is much better and comes with Subversion. For
example, it has an "add-only" property where users can create a new
folder or file via a "svn cp", but not edit an existing folder or
file. This prevents tags from being modified.

I am still working on how to do the second hook. I want users to be
able to specify the files they want to watch themselves without having
to personally tell me. That means making something that can be stored
on the server where the hook script can find it, yet allows all users
to update it.

Another hook I have is one that verifies that particular subversion
properties are attached to your files before being committed. For
example, we want all files that end in *.sh, *.pl, and *.makefile to
have the property "svn:eol-style" = "LF". Users can configure
auto-properties, but this guarantees that the property is on the file
before being committed. Another one I have makes sure that the file
name is legal on Windows systems. In Windows, you cannot have files
with certain names (like "aux"). Plus, I want to avoid files with
backslashes and other special characters that cause problems with
Subversion (like the "@" sign), cause problems with Windows (a whole
slew of characters) or Unix problems.

David Weintraub
On Wed, Jul 16, 2008 at 8:27 AM,  <christian.peper_at_kpn.com> wrote:
> Hi all,
> 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. :)
> And... if they are "must-have" or commonly implemented, why are they not
> included with the svn server by default?
> Sincerely,
> Chris.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
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 21:58:34 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.