SVN how to set a FSFS repository to be read only?

433 Views Asked by At

I have a couple of FSFS based file system SVN repositories that I wish to switch to be read only. Is there a flag I can enable that will stop svn clients from writing to the repository?

Alternatively I could simply remove all write permissions from the folder, but that feels overkill.

2

There are 2 best solutions below

0
bahrep On BEST ANSWER

Use svnadmin freeze to make your repos read-only or configure user or filesystem permissions so that noone could commit. Proper approach depends on the actual task you have but I guess that svnadmin freeze should help you in most cases.

svnadmin freeze is available starting with Subversion 1.8. Make sure that your Subversion is up-to-date.

6
Ivan Zhakov On

One option is to use start-commit hook with content like this:

echo "Repository is readonly"
exit 1