您可以将修订版与 Subversion 结合起来吗

发布于 2024-08-08 22:41:31 字数 138 浏览 7 评论 0原文

我可以在 Subversion 中进行多个修订并将它们合并为一个吗?

我希望能够进行一些提交,其中包括一些我不再关心的临时死胡同,并生成一个修订。没有任何原因,只是为了整理一下 bug 修复的 svn 历史记录。

Can I take multiple revisions in Subversion and combine them into one?

I'd like to be able to take a few commits that include some interim blind alleys that I no longer care about and produce a single revision. For no reason other than to tidy up the svn history of a bug fix a litle bit.

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

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

发布评论

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

评论(4

清欢 2024-08-15 22:41:31

如果您可以执行此操作,您就可以更改 Subversion 服务器的历史记录。如果您可以修改旧版本,您如何信任您的代码?

我真的想说,你不应该这样做。如果您有不喜欢的旧提交,即使您可以“删除”它们,您也不应该这样做。它们是 HEAD 历史的一部分。只需要很大的提示即可。您将在此代码中犯更多错误...只需修复它们并继续。

No

If you could do this you could change the history of your subversion server. How can you trust your code if you can modify old revisions?

Really I mean, you shouldn't want to do this. If you have old commits that you don't like, even if you could 'delete' them, you shouldn't want to. They are part of this history of the HEAD. Only the tip needs to be great. You'll make many more mistakes in this code... just fix them and move on.

飘逸的'云 2024-08-15 22:41:31

您可以使用 svnadmin dump 来执行此操作,然后手动编辑转储文件,然后再次使用 svnadmin load 来执行此操作,但不建议这样做,因为它容易出错并且有些失败版本控制的目的。

不要这样做。

You can do this using svnadmin dump, then manually editing the dump file, and svnadmin load it again, but it’s not recommended to do this because it’s error-prone and somewhat defeats the purpose of version control.

Don’t do it.

痴骨ら 2024-08-15 22:41:31

不,你不能。

如果您在存储库上安装了 pre-revprop 挂钩,则可以编辑提交注释,这是您能够获得的最接近的结果。

No. You cannot.

You can edit the commit notes if you install a pre-revprop hook on your repository, that's as close as you will be able to get.

嗫嚅 2024-08-15 22:41:31

这在版本控制系统中不是标准的或可取的。当然,您可以通过大量工作进行增量签出,将文件复制到另一个新的本地数据库,并在您想要的地方提交(即使这样,移动或删除也很难管理)。

您可以轻松地做的是使用 svnadmin dump 和 svndumpfilter 结合从存储库中删除文件和路径。这可以帮助您删除存储库中没有位置的文件,这是一个很容易犯的错误(使用 SVN 删除它们仍然会将它们留在存储库中,这有时会导致巨大的文件)。需谨慎使用。

It is not something standard or desirable in version control systems. You could of course, with a huge amount of work, proceed to incremental checkouts, copy the file to another new local database with commits where you want to have them (and even like that, moves or deletes would be hard to manage).

What you can easily do is drop files and paths from a repository with a svnadmin dump coupled with a svndumpfilter. That could help you get rid of files that have no place in a repository, which is an easy mistake (deleting them with SVN still leaves them in the repository, which sometimes leads to huge ones). To use with caution.

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