Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseSVN merging branch to trunk

I know this has been asked several times so I apologize for asking it again, but I just want to be sure I understand the difference between the different merges.

I'm the only dev on this project so I'm not worried about over-writing other peoples work.

I created a branch of this project because i was about to add some new features and in the event i needed to fix any bugs in the current code, I didn't want to have to deal with working around half finished code. So trunk contains the 'stable' release and the branch is basically alpha/beta build.

Before i had a chance to really start on those changes, i wound up fixing several bugs and committed them to the branch build. I want to merge the branch back into trunk to commit those fixes, and then I can start on my changes working on the branch.

When i go into TortoiseSVN and select merge, i have two options: Merge a range of revisions OR Merge two different trees

First one says its for when I've made revisions to a branch or trunk and want to port those changes to a different branch

Second one says it's when i want to merge the differences of two different branches into my working copy.

When i try the first option, URL to merge from i pick my branch and all revisions. Click next and when i click test I get a tree conflict over some files that were moved/deleted/added.

When i try the same thing with the 2nd option (using a test merge) using head revision, it seems to work. Which is the correct method? or are neither of them correct for what i want to do?

like image 997
merk Avatar asked Aug 27 '13 22:08

merk


1 Answers

In your case I think you don´t need Merge two different trees, because your trunk and branch have a relationship, so this not what you need.

Reintegrate a branch is that what you need if you want bring changes from branch to trunk.

You can use Merge a range of revisions for merge from trunk to branch (update to newest stable version), but also for merge branch to trunk (I work mostly with this option).

Maybe this SO-Question can also help you and here is the "standard literature" for the topic.

Update:

(Tortoise) Merge-Options:

enter image description here

Update II:

(Tortoise) Merge-Options in current Version:

enter image description here

"Merge a range of revisions" is normally used for a "branch to trunk"-Merge.

like image 103
Micha Avatar answered Sep 21 '22 23:09

Micha