Mar16
2007
2007
It would appear that Subversion does not support a direct “undelete” command so here is one way to recover/undelete a file that was previously removed from a Subversion repository. The 955 is the version of the repository where the file last existed.
$ svn cp -r 955 http://svn.domain.com/reponame/pathtofile/foo.bar foo.bar
A foo.bar
$ svn commit -m "Undeleted this file" foo.bar
Best of luck!
March 20th, 2007 at 7:32 pm
Never trusted subversives !!
January 7th, 2009 at 11:23 pm
There is a better way to restore a deleted file or directory that will maintain the history of the file(s) in the repo
svn copy –revision 1608 http://repo.example.com/project/target http://repo.example.com/project/target
that command will restore the target file or directory in to the same location as it was in revision 1608
January 22nd, 2010 at 4:13 pm
Thanks for the post, and thanks for Jared’s comment. Jared’s way worked for me to undelete a directory.