How do I use the new SVN merge-tracking?

前端 未结 3 1356
陌清茗
陌清茗 2021-01-30 11:46

In my existing (Pre-SVN 1.5) merge strategy, we create a copy of the Trunk (called BasePoint) at the moment of branch-creation for referencing later during the merge.

Whe

相关标签:
3条回答
  • 2021-01-30 11:47

    A good blog post about merging problems in svn (and what reintegrate does) is here.

    0 讨论(0)
  • 2021-01-30 11:57

    I believe reintegrate does not actually do the two operations, but instead is used to merge back into trunk from an updated branch. You will still need to do the first set of merge/commit operations to update the branch first.

    Here is a link to the Subversion Book. It is possible to get this book in dead tree format.

    From the link, it sounds like using --reintegrate handles some weird cases, probably like merge usually does compared to just using straight patches (read the section "Why Not Use Patches Instead?").

    0 讨论(0)
  • 2021-01-30 12:03

    The short answer is, You still have to do both steps.

    The SVN book explains the process for merging as:

    1. svn merge http://trunk/path while in a branch working copy
    2. svn merge --reintegrate http://branch/path while in a trunk working copy

    Notice the lack of revision numbers. This probably doesn't feel like a huge win. The new coolness is the ability to re-run the merge as you are coding in your branch, allowing you to keep the branch up to date with changes in trunk (without recording revision numbers by hand!). SVN keeps track of what needs to be merged in from trunk and what changes are unique to the branch. When you are done with the branch, --reintegrate uses that data to automatically merge only the branch changes back to trunk.

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