有什么方法可以同时跨多个非连续修订进行 svn diff 或 svn merge 吗?

发布于 2024-08-30 02:07:10 字数 439 浏览 8 评论 0原文

所以在 SVN 中你可以做这样的事情:

svn merge -r555:558
svn diff -c551

但是(据我所知)没有办法做:

svn merge -r555:558, 592:594
svn diff -c551, 557, 563

对于合并,你总是可以按顺序执行几个命令:

svn merge -r555:558
svn merge -r592:594

但是对于差异,这样做只会导致多个差异(而且它是对于合并来说也有点次优,因为您可能会因为可能在以后的修订中删除的内容而产生冲突)。

所以,我的问题是……有没有什么办法,使用 SVN 本身或 SVN 与 Linux 命令相结合,来进行真正的、无顺序的、多修订版本差异和/或合并?

So in SVN you can do things like:

svn merge -r555:558
svn diff -c551

but (as far as I know) there is no way to do:

svn merge -r555:558, 592:594
svn diff -c551, 557, 563

For merges you can always just do several commands in sequence:

svn merge -r555:558
svn merge -r592:594

but for diffs doing that will just result in multiple diffs (and it's a little sub-optimal for merges too, as you can get conflicts from things that might just be removed in later revisions).

So, my question is ... is there any way, using either SVN itself or SVN combined with Linux commands, to do a true, no-sequential, multi-revision diff and/or merge?

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

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

发布评论

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

评论(1

戒ㄋ 2024-09-06 02:07:10

您可以在一个命令中合并多个修订(至少在 1.6 中):

svn merge -c 551, 557, 563
svn merge -r 555:558 -r 592:594

但是 svn diff 似乎不支持多个非连续修订。

要获得累积补丁,您可以单独获取差异,然后使用combine-diff将它们一一合并在一起。这并不理想,但您可以编写一个脚本来自动化该过程。

You can merge multiple revisions in one command (at least in 1.6):

svn merge -c 551, 557, 563
svn merge -r 555:558 -r 592:594

however svn diff does not seem to support multiple non-sequential revisions.

To get a cumulative patch, you can get the diffs individually and then use combine-diff to merge them together one-by-one. It's not ideal, but you could write a script to automate the process.

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