A directory had been deleted a while ago from the repository and we want it back without interfering with commits that were since made in other parts of the repository, and without having to have the repository in the workspace.
– Find out which revision of the commit it was that deleted the directory and substract 1 of it.
– Use the copy command which copies the full content of a directory from back then and commit it now including the history of the directory.
Directory to undelete: /code/interface1
Revision of the delete commit: 1264
Now we are going to copy the full content of the directory for a revision just before it got deleted. meaning using the revision 1263
svn copy -m 'Undeleting the /code/interface1' //svn.company.com/code/interface1@1263 //svn.company.com/code/interface1
Committed revision 1289
The deleted directory /code/interface1 should be back there where it was. It is done via a new commit without interfering with any subsequent commits in other parts of the repo including the diffs from history related to this directory.