You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rob Wilkerson <r....@gmail.com> on 2006/08/02 18:05:29 UTC

Implementing svnperms.py

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

Re: Implementing svnperms.py

Posted by Rob Wilkerson <r....@gmail.com>.
One follow up question:  can someone offer a more comprehensive
explanation of the -s flag (NAME)?  The more I look at it, the less
I'm sure that I understand exactly what it's doing.

Thanks again.

On 8/2/06, Rob Wilkerson <r....@gmail.com> wrote:
> 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
>


-- 

Rob Wilkerson

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org