Recover a folder or file in TortoiseSVN whilst also retaining all history.
Posted
by Topdown
on Stack Overflow
See other posts from Stack Overflow
or by Topdown
Published on 2010-05-19T05:17:22Z
Indexed on
2010/05/19
5:20 UTC
Read the original article
Hit count: 705
tortoisesvn
|svn
In revision 1 a folder existed. In revision 2 the folder was accidently deleted and the change committed.
We wish to roll back such that the folder is present, and retain its history.
In the TortoiseSVN docs it indicates 'how' in the section titled "Getting a deleted file or folder back".
To quote:
Getting a deleted file or folder back
If you have deleted a file or a folder and already committed that delete operation to the repository, then a normal TortoiseSVN -> Revert can't bring it back anymore. But the file or folder is not lost at all. If you know the revision the file or folder got deleted (if you don't, use the log dialog to find out) open the repository browser and switch to that revision. Then select the file or folder you deleted, right-click and select [Context Menu] -> [Copy to...] as the target for that copy operation select the path to your working copy.
A switch retrieves the file into my working copy as one would expect, however there is no "Copy to" option on the context menu when I right click this working copy. If I open the repos browser, there is a copy to option, but it seems this simply takes a copy of the file.
The solution I feel is to do a Branch/Tag, but if I try this from a prior revision to the same path in the repository SVN throws error that the path already exists.
Therefore, how do I recover a folder/file in TortoiseSVN whilst also retaining all history.
TortoiseSVN v1.6.8, Build 19260 - 32 Bit , Subversion 1.6.11,
© Stack Overflow or respective owner