开发者

How do I export a subtree that has already been deleted when there's no suitable tag with Tortoise SVN?

开发者 https://www.devze.com 2023-02-23 05:34 出处:网络
I have an SVN repository with a very huge tree. I stare into the changelog in Tortoise SVN and see that in some revision X another user added a subtree with a project that is interesting to me开发者_S

I have an SVN repository with a very huge tree. I stare into the changelog in Tortoise SVN and see that in some revision X another user added a subtree with a project that is interesting to me开发者_StackOverflow. Then in revision X+P he deleted the project.

I want that subtree as a whole - without manually retrieving each file with Tortoise SVN and manually restoring the subtree structure.

Normally I would expect a tag being added between those revisions, so I'd go into that tag and export from there. In this case revisions are very close and there's no tag between them.

How do I retrieve a whole deleted subtree with Tortoise SVN?


Use "Update to revision" or checkout using a revision number, then do the export.


Most subversion commands take a -r parameter which defines on which revision the command is supposed to work. So in your example if you want to export the code you can do something like this:

svn export -r [revision number that has the code] [URL to repo]

Update:

Sorry, I did not see you wanted to use TortoiseSVN. I don't have a Windows here. But if all else fails the command line client should be somewhere in the TortoiseSVN installation IIRC.

You can try to use the repo browser though, I think that can switch to a certain revision. And maybe you can export from there.


Trumpi has it right - right click on the directory you have, and choose 'update to revision', then enter the last revision number where your subdirectory exists. Svn will make your local copy look exactly as it was at that point in time. You can then copy the sub-project somewhere, and update your working copy back to the HEAD revision.

Alternatively, open the repo browser, enter the revision number in the box at the top to see the state of the repository at that point in time, and select 'export' or checkout just that sub-project.

0

精彩评论

暂无评论...
验证码 换一张
取 消