I am trying to figure out if we need to reduce the number of developers having svn admin rights.
1 - If a subversion user accidentally deletes and commits the delete of a file or folder, how can the file be recovered?
2 - If the subversion user has svn admin rights, does svn delete executed on the client behave differently (more permanent)?
Target: svn command line client under Red Hat Enterprise Linux (RHEL) 5.2
If you have not committed a delete operation to the repository, then use TortoiseSVN -> Revert to retrieve the file. If you have already committed the deletion: Use the log dialogue box to find out the revision of your file. Open the repository browser and switch to that revision.
To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…
If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert.
svn delete (del, remove, rm) — Delete an item from a working copy or the repository.
Yes, the deleted data can be recovered. Simply determine which revision removed the information, and "reverse-merge" the commit. Something like this:
svn merge -c -12345 working_copy_path
svn commit working_copy_path
The -12345 means "reverse-merge revision 12345".
Note that subversion itself doesn't have any concept of "administrative" users. Users either have or do not have read and/or write permissions to any given path in the repository. Also note that depending on how you access the repository, there may effectively be no authorization at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With