views:

594

answers:

3

We have accidentally deleted the 'tags' folder from our Subversion repository where we only intended to delete one specific tag. What is the easiest way to get the 'tags' folder back?

We use TortoiseSVN as our client and I thought that when I go to the repo browser and show log, there will be something like "revert changes from this revision" similarly to what you can see in a similar dialog on your working copy. But there is no such command there...

A: 

Goto Repository Browser of your repository, right-click on the parent folder where your deleted folder existed. Now, Show Log of the parent folder, and select the previous revision where you committed the delete operation. You'll have a list and right click on the folder from the revision info and select Update to this Revision.

You are done

Munim Abdul
There is no such command there, sorry.
Borek
Oh I see, it was not in the Show Log dialog but in the main repo browser window. Still, that command will attempt to update my local working copy while I'd like to fix this problem on the server directly (you can imagine that checking out hundreds of tags, each containing thousands of files, is not exactly what I'd like to do).
Borek
+4  A: 

Just copy the deleted folder back from an earlier revision.

In the Repository Browser, click the button labeled HEAD to show to a revision there your folder still exists, then right-click that folder and select "Copy to..." and enter the path there you want the folder to be re-created (probably the same path that is already in the text box).

Mikael Sundberg
Great tip, thanks. One TortoiseSVN gotcha - in that "copy to..." dialog I had to change the path from 'example.com/svn/tags' to 'tags1' and then back for the OK button to become enabled.
Borek
+1  A: 

You will need to do a reverse merge. For details on how to do it (and pretty much anything else you would ever want or need to do with SVN), there's an excellent free book available online here.

Daniel