Subversion: Restore deleted files
Posted on September 17th, 2008 by Sacha Chua
If you accidentially delete a file and then commit the change, you can retrieve the file along with the rest of the history by using svn copy to copy it into your working directory. svn copy -r revision-number your-full-repository-path-to-the-file file
Save to - del.icio.us - Digg it - reddit - StumbleUpon
Thank you for your posting. Can you give an example of the full repository path? Is this something that exists in all installations of OS 10.5, or does it have to be setup separately?
Also, sorry for asking, but what is a "revision-number" and how do I find it?
Thanks.
I was trying to restore a deleted file through Subclipse on Eclipse. I don't know how to submit a console command to Subclipse, and I couldn't use "Restore from local history," since it was deleted by someone else. The only way I found to do it was to go through the parent folder's history and find what revision deleted the file. I then went to the SVN Repository and checked out the parent folder with the revision just before the delete.
Paulie,
This blog post explains how to do it in Subclipse:
http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html
Mark