views:

296

answers:

4

I am setting up Apache server with TortoiseSVN for a local source code repository. I have observed that if someone deletes a file using TortoiseSVN it will get deleted from everyone's view and the only log will be their in log history. I feel it is dangerous that any user can delete a file if they have read/write rights (accidentally or intentionally, and though the file remains on the server it is risky and can create panic in others).

Is there a way that only admins can add or delete files?

+1  A: 

One of the beauties of source control is that it doesn't matter if someone deletes a file. If they delete a file and check it in and it should not have been deleted, just revert their revision. Simple as that.

aaronjensen
A: 

I would recommend that you read a book about version control, preferably the Version Control with Subversion. What you describe is not a problem, this is how version control works.

Palmin
+3  A: 

Adding and deleting files are common operations in source management. You should not have to protect you against that.

Anyway, subversion (and any VCS actually) allows you to retrieve accidentally deleted files by doing copies or merging. This page from the Subversion documentation explains how to recover deleted files. You should look under the "Undoing changes" and "Resurrecting Deleted Items"

Romain Verdier
+3  A: 

You can set up a pre-commit hook on your repository to control what users can add or delete files.

cjm