Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to freeze entire SVN repository to make it read-only

Tags:

svn

Can't find an answer to my exact question. We migrated to a different source control system and want to keep a read-only snapshot of the entire repository. No one should be able to commit any changes anywhere. Is there a way to do this?

like image 614
Mario Aguilera Avatar asked Mar 09 '10 17:03

Mario Aguilera


People also ask

How do I restrict access in SVN?

As @jpierson already answered, you can use authz files to define No Access, Read Only or Read Write rules on repository paths. Repository path can represent repository root and any path within repository. I.e. you can specify access rules not only subtrees (folders) but files as well.


1 Answers

You can create a hook to do this:

repository/hooks/pre-commit

#!/bin/sh echo "No more commit here - this is an archive branch" 1>&2 exit 1 

Notes that log messages must be redirect to /dev/stderr (that's the meaning of the 1>&2).

like image 135
Romuald Brunet Avatar answered Sep 21 '22 13:09

Romuald Brunet