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

Implementing svnperms.py

From: Rob Wilkerson <r.d.wilkerson_at_gmail.com>
Date: 2006-08-02 20:05:29 CEST

I'm trying to install svnperms.py (and svnperms.conf, of course) and I
can't seem to find an example pre-commit script that actually makes
the call. Is there such a thing? I've seen the example configuration
file, of course, but no hook file.

My hook file currently looks like this:
============================================
REPOS="$1"
TXN="$2"

# Make sure that the log message contains some text.
SVNLOOK=/usr/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null || exit 1

# Check that the author of this commit has the rights to perform
# the commit on the files and directories being modified.
# commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1

/usr/bin/python /path/to/svnperms.py \
 -r $REPOS \
 -t $TXN

exit 0
============================================

Is that sufficient? I see a lot of other flags, but the don't seem to
be applicable in my environment (i.e. my conf file is
repos/conf/svnperms.conf). I'm also wondering about the exit
statements on the other calls. Do I need something similar here or is
that handled by the Python script itself?

Thanks.

-- 
Rob Wilkerson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 2 20:10:06 2006

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.