替换 Subversion 文件夹并保留历史记录

发布于 2024-08-06 14:42:07 字数 260 浏览 5 评论 0原文

我在一个 SVN 存储库中有两个开发树 v3.3 和 v3.4。它们都包含一个名为测试工具的项目。然而,v3.4 开发人员破坏了测试工具,因此我们需要 v3.3 中项目的测试工具来覆盖 v3.4 中的内容。我想保留 3.4 测试工具的更改历史,因为它有一些有趣的想法。
我曾想过删除 3.4 test-harness 文件夹,然后将 3.3 test-harness 的导出副本添加到 3.4 中,但随后我会丢失 v3.4 test-harness 历史记录 。 。 .
最好的方法是什么?

I have two development trees v3.3, and v3.4 in one SVN repository. They both contain a project called test-harness. However, the v3.4 developers have wrecked the test-harness so we need the test-harness from project in v3.3 to overwrite what we have in v3.4. I want to retain the history of change made to 3.4 test-harness as it has some interesting ideas.
I had thought of deleting the 3.4 test-harness folder, then just adding an exported copy of 3.3 test-harness into 3.4, but then I'd lose the v3.4 test-harness history . . .
What is the best way to do this?

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

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

发布评论

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

评论(3

余生共白头 2024-08-13 14:42:07

删除 3.4 文件夹并将 3.3 文件夹复制到其上时,不会丢失任何内容。这就是颠覆的目的。您可以使用“peg revision”访问“旧”版本 3.4,即使用

svn ls path:/to/repository/version/3.4@<some old revision>

来查看旧版本中的路径是什么样的。

When removing the 3.4 folder and copying the 3.3 folder over it nothing is lost. That’s what subversion is there for. You can access the “old” version 3.4 by using a “peg revision”, i.e. use

svn ls path:/to/repository/version/3.4@<some old revision>

to take a look at what the path looked like at that old revision.

只有一腔孤勇 2024-08-13 14:42:07

您可以删除 3.4 文件夹中的所有文件,然后在该空文件夹中分支(或复制)V3.3。无论如何,Subversion 都会保留 3.4 文件夹的整个历史记录。我认为最好的办法是将当前的 3.4 版本分支到另一个文件夹(例如 3.4-broken 也应该保留历史记录),删除原始文件夹并将 3.3 分支到 3.4。

You can delete all files in the 3.4 folder and then branch (or copy) V3.3 in that empty folder. Subversion will keep the entire history of the 3.4 folder anyway. I think the best thing would be to branch the current 3.4 Version into an alternative folder (e.g 3.4-broken should keep the history, too), delete the original folder and branch 3.3 into 3.4.

霞映澄塘 2024-08-13 14:42:07

也许它可以帮助您:

移动文件或目录

svn move source destination

重命名文件或目录:

svn rename oldname newname

[]'s,

And Past

maybe it helps you:

Move a file or directory

svn move source destination

Renaming a file or directory:

svn rename oldname newname

[]'s,

And Past

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