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

RE: Confused about how to merge changes from branch to trunk

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Wed, 25 Sep 2013 18:45:23 +0000

> Posted a question about this on stackoverflow but the advice i've been given
> there doesn't seem to be working as i think it should when i do a test merge.
>
> http://stackoverflow.com/questions/18970598/tortoisesvn-merging-a-branch-
> to-trunk
>
> In a nut shell this is my situation.
>
> Have a project where there was just the trunk. My working copy was on trunk. I
> made a new branch and switched my working copy to that branch. Since doing
> that i've made some code changes i want to copy back into branch before i do
> anything further. Another dev has also checked in some code changes into
> trunk as well. We have NOT worked on the same files so there should be no
> conflicts or need to merge differences between files.
>
> revision numbers
>
> 153 is the creation of the branch
> 154 is some code i checked into the branch
> 155-158 is the code the other dev checked into trunk
> 159 another change i checked into branch
>
> On stackoverflow i was told to merge a range of revisions without selecting a
> range and merging FROM the branch. When i do this though it appears to be
> re-adding every file in the project. even though between all those revisions
> maybe 20 files were changed.
>
> What i want to do is take revisions 154 and 159 and move those into the trunk.
> I'd also like take revisions 155-158 and merge those into the branch. Although i
> dont really need those files - as long as they don't get over-written when i am
> finished working on the branch and merge everything back into trunk, then
> those files can probably stay in trunk. But i'd rather get everything as synced up
> as possible.

First... this depends on what version of TSVN you are using. I don't see that you mentioned it.

Basically, you need to merge from trunk into your branch. That will bring everything from trunk since you did your copy into your branch. Once your project is good, pass tests, compile etc... commit that merge to your branch.

Then you want to "reintegrate" the branch into the trunk. How to do this step depends on if you are on 1.7 or 1.8.

If you are on 1.8 you basically do that same as before... merge into trunk from branch. Commit to trunk, and continue using your branch.

If you are in 1.7 you need to do a "reintegration" merge into trunk from branch. Commit to trunk... then you should delete your branch. However, you can continue using the branch if you once again merge from trunk, this time merge in the revision that you commited the merge from branch in your trunk. But, do a "record only" merge. Commit that. If you do this "incantation" you should be able to continue using the branch.

BOb

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-09-25 20:45:33 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.