What's the difference between “svn merge --reintegrate” and svn merge without reintegrate if I'd like to merge a branch onto the trunk

前端 未结 2 1717
天涯浪人
天涯浪人 2021-02-12 13:02

In the svn book it says merge\'s --reintegrate is \"to merge all of the source URL\'s changes into the working copy\".

I would like to merge

相关标签:
2条回答
  • 2021-02-12 13:24

    Upgrade to svn 1.8 and don't worrry about it anymore, it will automatically figure out what to do.

    from the svn 1.8 release notes:

    During merges which merge all eligible revisions from another branch, Subversion 1.8 will automatically decide whether or not the merge is reintegrating a branch. Therefore, reintegrating a branch does no longer require the --reintegrate option for correct operation.

    0 讨论(0)
  • 2021-02-12 13:31

    A sync merge is something completely different than a reintegration merge. The former is used to merge all changes made on the parent branch to the target branch (typically a feature branch), that have not already been merged. The latter is used to merge a (feature) branch back into the parent branch. Basically that means a temporary clone of the (feature) branch is created, a sync merge is made from the parent branch to the temporary branch, and finally the parent branch is replaced by the temporary branch. In other words, the temporary branch contains all changes made to the (feature) branch and parent branch.

    For some reason, some developers do not understand the difference. So, the SVN developers removed the option --reintegrate in SVN 1.8. With this version, the tool detects automatically, if a sync merge or a reintegration merge should be used.

    If you use an older version, you should use the option --reintegrate for reintegration merges. Note that the (feature) branch can still be used after reintegration, if you keep some things in mind. The SVN book explains it well:

    • Reintegrating a Branch
    • Keeping a Reintegrated Branch Alive
    0 讨论(0)
提交回复
热议问题