svnperms.py, svnperms.conf with pre-commit hook issue
From: Vijay Dhingra <dhingra_vijay01_at_yahoo.com>
Date: Tue, 19 Jan 2010 22:53:33 -0800 (PST)
Can someone help to set svnperms.py and svnperms.conf file along with pre-commit hook to make it restricted for tags to be created only. No one can remove or update tags portion.
We have one repository for every projects i.e.
So I would like my every repository tags area to be set that tags can only be created. However it doesn't seem to be working for me.
Here is what I defined in my pre-commit hook and svnperms.conf file. If I don't include svnperms.py it works fine or if pre-commit is empty with only these below line, still it works.
# Make sure that the log message contains some text.
$SVNLOOK log -t "$TXN" "$REPOS" | \
grep "[a-zA-Z0-9]" > /dev/null || exit 1
/usr/local/svn/scripts/svnperms.py -r $REPOS -t $TXN -f /svn/project1/conf/svnperms.conf || exit 1
# All checks passed, so allow the commit.
In svnperms.conf file I used various options but still unable to make it work:
([^/]+)/trunk/[^/]+/ = *(add,remove,update)
([^/]+)/tags/.+ = *(add)
([^/]+)/branches/[^/]+/ = *(add,remove,update)
trunk/.* = *(add,remove,update)
tags/[^/+]/ = *(add)
branches/[^/]+/.* = *(add,remove,update)
trunk/.+ = *(add,remove,update)
tags/.+ = *(add)
branches/.+ = *(add,remove,update)
trunk/[^/]+/ = *(add,remove,update)
tags/[^/]+/ = *(add)
branches/[^/]+/ = *(add,remove,update)
I would appreciate if someone can help me with this setup.
This is an archived mail posted to the Subversion Users mailing list.