Don't diff merges with SVN

前端 未结 1 802
孤街浪徒
孤街浪徒 2021-01-22 12:25

I would like to get a diff of all the changes I did on a feature branch.

Currently I use

svn log --stop-on-copy | awk \'/^r.+NAME/{print $1}\' | xargs -l         


        
1条回答
  •  清歌不尽
    2021-01-22 13:09

    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:r9

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

    0 讨论(0)
提交回复
热议问题