Reputation: 12139
I accidentally deleted a major folder inside of the Tortoise-SVN Repro Browser. The working folder is unaffected.
What is the recommended way to reverse that?
Do I just Revert back to the previous version?
Or do I need to do a Checkout to that previous version into a new folder and delete the old folder?
Upvotes: 6
Views: 8388
Reputation: 11
enjoy!
Upvotes: 0
Reputation: 1730
for the command line enthusiasts:
first find the revision number where your delete happened:
svn log -v http://svnserver/path/to/folderContainingDeletedFolder
say you find that the directory was deleted in revision 999 (btw: you might find it easier to find the revision number with the svn repo browser)
copy the folder from revision minus 1
svn copy http://svnserver/path/to/folderContainingDeletedFolder/deletedFolder@998 http://svnserver/path/to/folderContainingDeletedFolder/deletedFolder -m "undeleted folder"
voilà you're done!
Upvotes: 0
Reputation: 52659
Have you tried the TortoiseSVN docs?
This is described as Rollback revisions.
What happens is that you rollback the deletion, so the previous version (the one before you did the delete) becomes the new HEAD revision. The deletion will still appear in the log, but it also describes how you can save your embarrassment (though that's more complicated) :)
Upvotes: 0
Reputation: 8557
Since you mentioned you are using TortoiseSVN:
Do a TortoiseSVN | Show Log on the working directory. Right click on the checkin where you deleted the folder. Choose Revert changes from this revision.
That will re-create the missing files in your working folder. You can then revert any OTHER changes that were in that revision that you actually want to keep. Once you have your working folder in the state you want it, commit.
I am not sure if this method preserves the history.
Upvotes: 5
Reputation: 10496
There are other questions similiar to yours here at Stackoverflow. Maybe you could find something useful from the answers there.
Upvotes: 0
Reputation: 7516
See the Subversion book for more info.
Upvotes: 0
Reputation: 10166
Upvotes: 8
Reputation: 42008
You can do a copy from the revision just prior to the deletion to add it back into the repo.
Their isn't a real 'undelete' option in svn.
Upvotes: 1