[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Update feature branch with trunk changes before merging.

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Wed, 8 Jun 2011 16:08:59 -0400

> Thanks for the reply. What's the differences between a "reintegrate
> merge" and a regular "range of revisions" merge?

Is has to do with how the diff that gets merged in is done. When you select "range of revisions" a diff is done in the same path... for example, lets say you tell it to merge a range of revisions from /Branches/NewFeature into /trunk. First, you select the range or you can let subversion do it (by default it will select all revs that have yet to be merged). A diff is done from revX to revY on that path. This will get all the changes made and apply those changes to your target path.

But, guess what, now that you have merge trunk into branch (you did this to test that you feature works with any changes that have been made to trunk since you created the feature branch) if you do a diff in the diff to the head it is going to include the changes that you just merged in from trunk and apply it to trunk. This will give you all kinds of conflicts.

What you want is to diff HEAD of your trunk with HEAD of your branch and apply that to your trunk. This is basically what the re-integrate does.

There is a lot written on all this and how it works... but the above is a VERY basic description of the difference. Of course, re-integrate does a lot more than I described above.

>
> When merging from the branch to the trunk (after setting my WC to
> the trunk), I was thinking of doing the same "range of revisions"
> merge and selecting the head of the branch.

BTW: You should just let SVN select the revisions... unless you don't want to merge everything which is called cherrypicking.

I highly recommend you read the svn doc on Merging and the different branching strategies. There are also 4 or so blog entries about the merge tracking and re-integration and how it all works.

BOb

> On Tue, Jun 7, 2011 at 5:38 PM, Brian Tabios
> <brian.tabios_at_gmail.com> wrote:
> Hi Tim,
>
> Thanks for the help. My WC is the feature branch.
> I've finished doing a "Merge revision range" from the trunk. I
> sequentially selected each revision manually and resolved the
> conflicts.
> Now I'm ready to merge the branch back into the trunk.
>
> What are the next steps? I suppose I should commit these changes
> into the branch. Then I should set my WC to the trunk and do a
> merge from the branch. Is that correct?
>
> Thanks for the help!
>
> On Tue, Jun 7, 2011 at 2:00 PM, Brian Tabios
> <brian.tabios_at_gmail.com> wrote:
> I need to merge a feature branch back into the trunk. My WC copy
> points to the feature branch. I haven't merged any of the trunk
> into my branch yet. The documentation says that before
> reintegrating my branch, I should keep the branch in sync with the
> trunk changes. What's option in TortoiseSVN do I use to update my
> branch with the latest trunk changes?
>

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2760540

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-06-08 22:09:09 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.