有没有办法一次在多个非顺序修订版本之间进行svn diff或svn合并? [英] Is there any way to svn diff or svn merge across multiple non-sequential revisions at once?

查看:105
本文介绍了有没有办法一次在多个非顺序修订版本之间进行svn diff或svn合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,在SVN中,您可以执行以下操作:

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

所以,我的问题是...是否可以使用SVN本身或将SVN与Linux命令结合使用,以进行真正的,无顺序的,多版本的差异和/或合并?

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?

推荐答案

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

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

但是svn diff似乎不支持多个非顺序修订.

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

要获取累积补丁,您可以分别获取差异,然后使用combining-diff将它们一对一地合并在一起.这不是很理想,但是您可以编写一个脚本来自动执行该过程.

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.

这篇关于有没有办法一次在多个非顺序修订版本之间进行svn diff或svn合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆