How to recover an accidentally deleted folder in a svn repository

Corey Floyd picture Corey Floyd · Aug 28, 2009 · Viewed 19k times · Source

I know how to revert to a specific revision of a folder using these instructions:

http://aralbalkan.com/1381

However, I deleted the entire folder and want to get that folder back without reverting the rest of the repository.

I tried recreating the folder and then merging the changes back, but svn knows my trick and realizes it is a new folder.

How should I do this?

Answer

Avi picture Avi · Aug 28, 2009

The easiest way is probably to svn copy the tree you want, from the revision where it last existed:

svn copy src@rev dest

See the Subversion Book for details.