一些需要澄清的 ascii 艺术: r6 r9 r11--------+-------------+------O-->分支/(1)/(2) (3)/(4)后备箱 -----+-------+--------O----+---------O------>r4 r6 r7 r9 r12(1) 你开始你的分支(2) 你将你的主干与所有来自主干的提交同步(3) 这是主干上的提交(4) 您还必须合并 (3) 的提交(因此主干中不会丢失未合并到分支中的修订)然后您可以将 branch:r11 与 trunk:r9 进行区分请注意,不能与 trunk:HEAD 进行区分,否则会显示中继 r12 的更改.这正是重新整合合并的工作原理.I would like to get a diff of all the changes I did on a feature branch.Currently I usesvn log --stop-on-copy | awk '/^r.+NAME/{print $1}' | xargs -l svn diff -c > code.diffUnfortunately this includes the revisions where trunk got merged into my branch and clutters the diff. Is there a way to get svn log to skipp merges or to get diff to ignore them? 解决方案 As long as you merged all revisions from trunk into your branch you can diff the both trees of trunk (revision of last merge) and branch (head)Some ascii art to clearify: r6 r9 r11 --------+-------------+------O--> branch / (1) / (2) (3) /(4) trunk -----+-------+--------O----+----------O------> r4 r6 r7 r9 r12(1) you start your branch(2) you sync your trunk with all commits from trunk(3) this is a commit on trunk(4) you must merge the commit of (3) as well (so no missing revisions in trunk which are not merged into branch)You can then diff branch:r11 with trunk:r9Note that you cannot diff with trunk:HEAD as then the changes of trunk r12 will be displayed.This is exactly how reintegrate merge works as well. 这篇关于不要与 SVN 差异合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-25 10:47