Reputation:
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?
Upvotes: 2
Views: 768
Reputation: 12971
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"
Upvotes: 4
Reputation: 62099
You can set up a pre-commit hook on your repository to control what users can add or delete files.
Upvotes: 4
Reputation: 2811
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.
Upvotes: 0
Reputation: 6060
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.
Upvotes: 2