TortoiseSVN合并分支到主干

TortoiseSVN合并分支到主干

本文介绍了TortoiseSVN合并分支到主干的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问过几次了,因此我很抱歉再次提出这个问题,但是我只想确保我了解不同合并之间的区别.

我是该项目的唯一开发者,因此我不必担心会覆盖其他人的工作.

我创建了这个项目的一个分支,因为我将要添加一些新功能,并且如果我需要修复当前代码中的任何错误,我不想处理大约一半的代码.因此,主干包含稳定"版本,分支基本上是alpha/beta构建.

在我有机会真正开始这些更改之前,我总结了一些错误,并将它们提交给分支机构.我想将分支合并回主干以提交这些修复程序,然后就可以在分支上进行我的更改了.

当我进入TortoiseSVN并选择合并时,我有两个选择:合并一系列修订,或者合并两棵不同的树

第一个说的是当我对分支或主干进行修订并希望将这些更改移植到另一个分支时

第二个人说是我要将两个不同分支的差异合并到我的工作副本中的时候.

当我尝试第一个选项时,要合并的URL会选择我的分支和所有修订.单击下一步",当我单击测试"时,在一些已被移动/删除/添加的文件上出现树冲突.

当我使用头部修订版使用第二个选项(使用测试合并)尝试相同的操作时,它似乎起作用.哪种方法正确?还是他们都不适合我想做什么?

解决方案

在您的情况下,我认为您不需要合并两棵不同的树,因为您的 trunk 分支有关系,所以这不是您所需要的.

重新整合分支是,如果您希望将分支从分支更改为 trunk ,那么您需要的是.

您可以使用合并一系列修订版本 trunk 合并为 branch (更新为最新的稳定版本),也可以进行合并从分支 trunk (我主要使用此选项).

也许此SO-问题也可以为您提供帮助此处是该主题的标准文献". /p>

更新:

(草龟)合并选项:

更新II:

(草龟)当前版本中的合并选项:

合并一系列修订版本"通常用于分支到主干"-合并.

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 ORMerge 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.

这篇关于TortoiseSVN合并分支到主干的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 06:46