Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover an accidentally deleted folder in a svn repository

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?

like image 630
Corey Floyd Avatar asked Aug 27 '09 22:08

Corey Floyd


People also ask

How do I get reverted changes back in svn?

Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision.

How do I access svn folder?

You can either store your repositories locally and access them using the file:// protocol or you can place them on a server and access them with the http:// or svn:// protocols. The two server protocols can also be encrypted. You use https:// or svn+ssh:// , or you can use svn:// with SASL.

How do you undo a checkout in svn?

If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert.

How do I find a file in svn repository?

Check out files from Subversion repositoryIn the Get from Version Control dialog, click Add Repository Location and specify the repository URL. Click Check Out. In the dialog that opens, specify the destination directory where the local copy of the repository files will be created, and click OK.


1 Answers

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.

like image 197
Avi Avatar answered Oct 22 '22 17:10

Avi