Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion > Merging back into a trunk without --reintegrate?

Tags:

svn

This is a dumb question, but it's come up at work enough that I feel like asking in order to get a 2nd opinion. You can assume we are using Subversion 1.6+.

Here's a scenario - let's say I have a Trunk. I branch the Trunk at revision 10 to create a Branch1 and begin making my own changes to Branch1.

Meanwhile, Branch2 is created from the Trunk at revision 30. There are several revisions made (committed) in Branch2.

At some point, work is completed in Branch2 and its changes are merged back into the Trunk WITHOUT using --reintegrate.

I'm still happily working away in Branch1, but I now want to make sure I have ALL of the latest changes from the Trunk and any code changes made in other branches that are merged back into the trunk (i.e. Branch2).

The crux of the question - if I merge the Trunk into Branch1, will I see all of the changes that were merged back into the trunk from other branches, like Branch2? Should I have to merge the revisions in the Branch2 URL separately, then merge against the Trunk URL in order to guarantee I have all of the changes?

like image 866
DTS Avatar asked Feb 25 '23 20:02

DTS


1 Answers

If I understand your example, you will get the changes that were merged into trunk, even if they were merged without using --reintegrate.

The problem with not using --reintegrate is that if you had been keeping Project3 up-to-date by periodically merging from trunk into Project3, then you would end up with lots of conflicts when you merged back into trunk. This is because it would try to take those periodic merges, and re-apply them to trunk, when they were already in trunk to begin with.

But it doesn't matter how you did the merge, as long it's in trunk now.

BTW, your example is a little confusing. For one thing, you say things like "merge Project2 with the HEAD of the trunk". Merges have a direction; you should say that you "merge the trunk into Project2". Also, usually the term "project" refers to something that has a trunk and branches, but in your example it seems like the trunk is in a different project than the branches.

like image 144
JW. Avatar answered Mar 11 '23 21:03

JW.