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

Re: commit-access-control.pl for branch/tag naming conventions

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-07-26 23:59:38 CEST

On Jul 26, 2006, at 22:51, Justin Johnson wrote:

> I'm trying to us commit-access-control.pl to enforce branch and tag
> naming conventions. I setup commit-access-control.cfg as follows.
>
> [Make everything read-only for all users]
> match = .*
> access = read-only
>
> [Make trunk read-write for all users]
> match = ^trunk
> access = read-write
>
> [Enforce branch naming conventions]
> match = ^branches/(RB|BUG|TRY)-
> access = read-write
>
> [Enforce tag naming conventions]
> match = ^tags/(REL|PRE|POST)-
> access = read-write
>
>
> But when I tried to copy to a tag, for example, I got this error.
>
> C:\work\test_repos>svn cp .
> http://svn.mydomain.com/svn/test_repos/tags/REL-1.0 -m "test"
> svn: Commit failed (details follow):
> svn: MERGE request failed on '/svn/test_repos/tags'
> svn: 'pre-commit' hook failed with error output:
> /svn/tools/hook-scripts/commit-access-control.pl: user `justin' does
> not have permission to commit to this path:
> tags
>
> It looks to me like the match is on the path before the commit, not
> after. I'm not sure how I can use this to enforce naming conventions
> of directories that will be created as a result of the commit (such as
> the name of the branch or tag).

I haven't used commit-access-control.pl.... but is "test_repos" a
repository in your setup, or is it a directory in your repository? If
the latter, then the regular expressions you've written wouldn't
match.... You'd need e.g.

match = ^test_repos/tags/(REL|PRE|POST)-

or maybe

match = /tags/(REL|PRE|POST)-

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 27 00:01:05 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.