I have a directory structure in my SVN repository which is pretty standard:
/project1
/trunk
/branches
/branch1
/branch2
...
/tags
/project2
/trunk
/branches
...
I'm using Apache with mod_dav_svn to host the repository.
I would like to prevent people from accidentally checking out the root of a project or the root of the entire repository, which needlessly downloads many, many gigabytes of files, and usually causes all kinds of problems.
svn export simply extracts all the files from a revision and does not allow revision control on it. It also does not litter each directory with . svn directories. svn checkout allows you to use version control in the directory made, e.g. your standard commands such as svn update and svn commit .
You can use mod_dontdothat
for this. See the docs:
Specifically, it's designed to keep users from doing things that are particularly hard on the server, like checking out the root of the tree, or the tags or branches directories. It works by sticking an input filter in front of all REPORT requests and looking for dangerous types of requests. If it finds any, it returns a 403 Forbidden error.
Check out the section in the SVN book about Path-Based Authorization.
You could deny access to the root by default and allow read(write) access to the individual projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With