views:

263

answers:

4

Is there a way to completely erase a Subversion repository so that users can't access to old revisions?

PS: I have root access on the repositories machine.

+1  A: 

Delete the folder on the HDD? Subversion repositories are stored in folders... Alternatively you can change the configuration to deny all access to everyone (the method will vary depending on how the authorization is configured).

Pawel Krakowiak
The Subversion repositories have a complex structure, they aren't just a folder. Which one should I remove? How do I know that I won't corrupt the repository configurations? In other words: is there a command to accomplish that?
tunnuz
They ARE a folder... There is a root folder which holds all your repos and under it you have a subfolder for each repository, in example you can delete C:\Subversion\repos\{name} and the {name} repo will be gone.
Pawel Krakowiak
+1  A: 

1.) Delete folder manually (each repository has it own folder)

2.) or use svnadmin command (svnadmin dump).

glavić
+4  A: 

Just remove the root folder of the repository, but saving the conf/ folder it has inside. Then, create a new repository with svnadmin create, and overwrite the old configuration folder on it.

EDIT (for completeness): as Tunnuz and Jim T have pointed out, you may want to save also the contents of the hooks/ folder if it contains custom scripts.

UncleZeiv
This would lose any active hooks in the hooks directory. I think this advice, extended to also save the hooks directory, is what you want to do.
runako
+2  A: 

Not really, if you want to keep the configuration, MOVE all the contents of the repository directory to a safe place, then use svnadmin to create a new blank repository, then copy your conf and hook directories back in so that the users and automation scripts are replaced.

Your repository will then be blank, starting again from revision 1.

Jim T