简体   繁体   English

当Tortoise SVN没有合适的标签时,如何导出已经删除的子树?

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

I have an SVN repository with a very huge tree. 我有一个很大的树的SVN存储库。 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. 我盯着Tortoise SVN中的变更日志,看到在某个修订版X中,另一个用户添加了一个子树,其中包含一个对我来说很有趣的项目。 Then in revision X+P he deleted the project. 然后在X + P版本中,他删除了该项目。

I want that subtree as a whole - without manually retrieving each file with Tortoise SVN and manually restoring the subtree structure. 我希望整个子树-无需使用Tortoise SVN手动检索每个文件并手动恢复子树结构。

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? 如何使用Tortoise SVN检索整个删除的子树?

Most subversion commands take a -r parameter which defines on which revision the command is supposed to work. 大多数subversion命令采用-r参数,该参数定义该命令应在哪个版本上运行。 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. 抱歉,我没有看到您想要使用TortoiseSVN。 I don't have a Windows here. 我这里没有Windows。 But if all else fails the command line client should be somewhere in the TortoiseSVN installation IIRC. 但是,如果其他所有方法均失败,则命令行客户端应位于TortoiseSVN安装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. Trumpi正确无误-右键单击您拥有的目录,然后选择“更新至修订版本”,然后输入子目录所在的最后一个修订版本号。 Svn will make your local copy look exactly as it was at that point in time. Svn将使您的本地副本看上去与当时的样子完全一样。 You can then copy the sub-project somewhere, and update your working copy back to the HEAD revision. 然后,您可以将子项目复制到某个位置,然后将工作副本更新回HEAD修订版。

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. 或者,打开存储库浏览器,在顶部的框中输入修订号,以查看该时间点的存储库状态,然后选择“导出”或仅签出该子项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM