Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For one thing, the way that SVN calculates the differences to apply is different between the two methods. Normally, when you apply a range of revisions X to Y from a trunk to the branch in cherry-picking fashion, for example, SVN calculates the differences between the revisions of X to Y in the trunk, and applies those to the branch. You could also do the same thing in the other direction, applying changes from the branch to trunk this way.</p> <p>When you reintegrate a branch into the trunk, however, SVN does a different sort of calculation. Instead of calculating the difference between revisions X to Y in a branch and applying those changes to the trunk, SVN merely calculates the difference between the entire branch and trunk. Assuming that you've been diligent about keeping the branch up-to-date with changes made in the trunk, then the difference of the reintegration calculation between the trunk and branch will be exactly all of the changes made in the branch that are not yet in the trunk.</p> <p>From <a href="http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchemerge.basicmerging.reintegrate" rel="nofollow noreferrer">the SVN 1.6 documentation</a> (Reintegrating a Branch):</p> <blockquote> <p>When merging your branch back to the trunk, however, the underlying mathematics is quite different. Your feature branch is now a mishmash of both duplicated trunk changes and private branch changes, so there's no simple contiguous range of revisions to copy over. By specifying the <code>--reintegrate</code> option, you're asking Subversion to carefully replicate <em>only</em> those changes unique to your branch. (And in fact, it does this by comparing the latest trunk tree with the latest branch tree: the resulting difference is exactly your branch changes!)</p> </blockquote> <p>I'm not entirely sure (I've forgotten over the years), but I think in previous versions of SVN (like prior to 1.5?), there was no merge-tracking and no branch reintegration option, so if you wanted to merge a completed branch into the trunk, you had to do it manually using the range of revisions method instead. I'm trying to look this up in the docs, but I haven't found a reference about it yet.</p> <h2>Additional Reading</h2> <p>See also <a href="http://svn.haxx.se/users/archive-2008-05/0808.shtml" rel="nofollow noreferrer">Re: Why is <code>--reintegrate</code> needed for svn 1.5 merging?</a>, which was pointed out in <a href="https://stackoverflow.com/questions/6575325/svn-merge-a-range-of-revisions-vs-reintegrate/6575565#comment7753305_6575367">this comment</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload