Subversion: Restore deleted files

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

Common Use-Cases for Merging

Technorati Tags: ,

Save to - del.icio.us - Digg it - reddit - StumbleUpon

RSS feed | Trackback URI

3 Comments »

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

 
Name (required)
E-mail (required - never shown publicly)
Website / Blog address:
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line=""> in your comment.

Subscribe without commenting

`

On This Day...