简体   繁体   中英

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?

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:

在此输入图像描述

Update II:

(Tortoise) Merge-Options in current Version:

在此输入图像描述

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

The new version of tortoise svn removed the reintegrate branch. Instead the merge a range of revisions is handling this.

Checkout the discussion Tortoisesvn Subversion 1.8 - merge - no more reintegrate a branch option

Under the merge dialog, there is an option to "merge (old style)"

旧式重新整合

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM