12

我们使用 subversion 并且在每次签入期间,一个脚本会创建一个包含所有差异的补丁文件。现在对于同一个问题/缺陷,可能会有多个签入,我们最终会得到多个补丁文件。现在要查看问题的合并更改,必须合并所有补丁文件。有没有办法做到这一点?

或者解决相同问题的另一种方法是:在颠覆中是否有一种方法可以将所有更改的组合差异作为特定注释的一部分完成?例如:

签入评论:“123:第一次更改”
签入评论:“123:第二组更改”
签入评论:“123:第三次更改”..

有没有办法获得评论前缀为 123 的所有更改的组合差异?

4

2 回答 2

15

来自patchutils的combineiff可以为您组合差异。

(无耻地从这个先前的 SO 问题中借用。)

于 2009-11-30T10:32:27.850 回答
3

Make a new branch starting from the revision just before the first changeset. In the new branch, merge each changeset of the issue, in order. Take a diff between the start of the new branch and the final result.

(If you do issue-based branching, you'd get the above situation automatically).

Mercurial has a nice extension for handling collections of patches, namely the mq exension. That, in turn, is based on quilt (http://savannah.nongnu.org/projects/quilt), a system designed to stack patches onto each other.

于 2009-11-30T10:54:49.223 回答