We had a need to lock the trunk to ensure no changes were made during a code freeze. In subversion, the “trunk” has no significance outside of industry accepted standards. As such, what follows will work on any directory.
This is done with a pure ssh based subversion installation. All you must do is edit the authz file found under your repository_name/conf directory on the server that hosts the subversion repository.
Add the following line and it is immediately effective, i.e., no restarts of anything required.
[/trunk]
* = r
To change it back to read write, simply make the permissions “rw”, as shown below:
[/trunk]
* = rw
Once again, there are no restarts required to change it back and forth.