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

发布于 2024-10-30 19:03:00 字数 281 浏览 2 评论 0原文

我有一个 SVN 存储库,里面有一棵非常大的树。我盯着 Tortoise SVN 中的变更日志,发现在某个版本 X 中,另一个用户添加了一个子树,其中包含我感兴趣的项目。然后在修订版 X+P 中他删除了该项目。

我希望该子树作为一个整体 - 无需使用 Tortoise SVN 手动检索每个文件并手动恢复子树结构。

通常,我希望在这些修订之间添加一个标签,因此我会进入该标签并从那里导出。在这种情况下,修订版本非常接近,并且它们之间没有标签。

如何使用 Tortoise SVN 检索整个删除的子树?

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. 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

网名女生简单气质 2024-11-06 19:03:00

使用“更新到修订版”或使用修订版号进行结帐,然后进行导出。

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

忘年祭陌 2024-11-06 19:03:00

大多数 subversion 命令都采用 -r 参数,该参数定义命令应该在哪个版本上运行。因此,在您的示例中,如果您想导出代码,您可以执行以下操作:

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

更新:

抱歉,我没有看到您想要使用 TortoiseSVN。我这里没有Windows。但如果一切都失败了,命令行客户端应该位于 TortoiseSVN 安装 IIRC 中的某个位置。

不过,您可以尝试使用存储库浏览器,我认为这可以切换到某个版本。也许你可以从那里导出。

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.

念﹏祤嫣 2024-11-06 19:03:00

Trumpi 的做法是正确的 - 右键单击​​您拥有的目录,然后选择“更新到修订版”,然后输入您的子目录所在的最后一个修订版号。 Svn 将使您的本地副本看起来与当时的情况一模一样。然后,您可以将子项目复制到某处,并将工作副本更新回 HEAD 修订版。

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

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文