有什么方法可以同时跨多个非连续修订进行 svn diff 或 svn merge 吗?
所以在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在一个命令中合并多个修订(至少在 1.6 中):
但是 svn diff 似乎不支持多个非连续修订。
要获得累积补丁,您可以单独获取差异,然后使用combine-diff将它们一一合并在一起。这并不理想,但您可以编写一个脚本来自动化该过程。
You can merge multiple revisions in one command (at least in 1.6):
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.