[英]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. 因此trunk包含'稳定'版本,分支基本上是alpha / beta版本。
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. 我想将分支合并回trunk以提交这些修复,然后我可以开始在分支上进行的更改。
When i go into TortoiseSVN and select merge, i have two options: Merge a range of revisions OR Merge two different trees 当我进入TortoiseSVN并选择合并时,我有两个选择:合并一系列修订或合并两个不同的树
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. 当我尝试第一个选项时,从我选择的URL将选择我的分支和所有修订。 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). 您可以使用Merge一系列修订来从主干到分支进行合并(更新到最新的稳定版本),还可以使用合并分支到主干 (我主要使用此选项)。
Maybe this SO-Question can also help you and here is the "standard literature" for the topic. 也许这个SO-Question也可以帮助你, 这里是这个主题的“标准文献”。
Update: 更新:
(Tortoise) Merge-Options: (乌龟)合并选项:
Update II: 更新II:
(Tortoise) Merge-Options in current Version: (Tortoise)Merge-Options在当前版本中:
"Merge a range of revisions" is normally used for a "branch to trunk"-Merge. “合并一系列修订”通常用于“分支到主干”-Merge。
The new version of tortoise svn removed the reintegrate branch. 新版本的陆龟svn删除了重新整合的分支。 Instead the merge a range of revisions is handling this. 相反,合并一系列修订正在处理此问题。
Checkout the discussion Tortoisesvn Subversion 1.8 - merge - no more reintegrate a branch option 查看讨论Tortoisesvn Subversion 1.8 - 合并 - 不再重新集成分支选项
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.