How do you make a read-only branch or tag?

1,773 views
Skip to first unread message

shallowpool

unread,
Nov 1, 2007, 6:34:41 PM11/1/07
to Subversion SVN
This seems like it should be simple, but I cannot find any reference
in the svn manual as to how to make a read-only branch or tag with
svn? Is there a way to do this? Without manually tinkering with file
permissions in the repo directory?

joshblair

unread,
Nov 2, 2007, 10:31:58 AM11/2/07
to Subversion SVN
There may be other ways but I think that you can add logic to a pre-
commit hook script to disallow commits to certain branches/tags.

Good luck,

Josh Blair
Golden, CO

shallowpool

unread,
Nov 2, 2007, 4:23:33 PM11/2/07
to Subversion SVN
Yes, Shallowpool, you need to edit the authz file in the repository's
conf dir. Also make sure you edit the svnserve.conf file and set
authz-db = authz. This all assumes you are using the svnserve
approach rather than Apache.

Now, the Subversion documentation is somewhat vague in how to setup
the authz file. Namely, because their examples did not work for me.
So, I have some rules that look something like the following:

[/trunk]
* = rw

[/branches]
* = rw

[/branches/my_special_branch]
* = r

[/tags]
* = r

You get the idea? You can also use groups and such as explained in
the manual.

> > permissions in the repo directory?- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages