如何使用 Eclipse 合并工具将 CVS 分支合并到 HEAD 中?
我目前在使用 Team-->Branch 创建的一个分支中工作。 如何使用 Team-->Merge 将我对分支的更改合并回头?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我目前在使用 Team-->Branch 创建的一个分支中工作。 如何使用 Team-->Merge 将我对分支的更改合并回头?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
我也遇到了这个问题。 以下是我进行合并的步骤(主要取自在线 Eclipse 帮助):
)现在准备开始实际的合并过程。 在这里,您将选择应该进行哪些更改以及应该放弃哪些更改。 将此过程视为半自动化的开发周期,实际上是一个检查、更改、提交周期。 只是您不必手动插入更改,而是可以使用比较工具来帮助您。 毕竟您已经在分支中进行了所有代码更改!
合并:
希望有帮助。
下面提供的就是指导我走向胜利的帮助文档的内容,仅供参考!
Eclipse SDK帮助 - 合并分支
I was having trouble with this too. Here are the steps I take to merge (mostly taken from the online Eclipse help):
You are now ready to begin the actual Merging process. Here you will be picking which changes should come over and which should be discarded. Think of this process as a semi-automated development cycle, effectively a checkout, make changes, commit cycle. Only instead of manually inserting your changes you have compare tools to assist you along. After all you've already made all the code changes in your branch!
To Merge:
Hope that helped.
Provided below for reference is the contents of the help document that guided me to victory!
Eclipse SDK Help - Merging a Branch
确保目标已加载到您的工作区中。 这是最重要的部分,也是我在尝试做几次时错过的部分。
例如,如果您希望将更改合并到 HEAD 中,请确保该项目与工作区中的 HEAD 共享(而不是您一直在处理的分支)。 为此,请选择项目并选择“团队”>“团队”。 替换为> 上下文菜单中的另一个分支或版本。 然后选择要替换的分支。
从此时开始,选择“团队”> Merge,然后选择要合并到 HEAD 的分支。
Ensure that the destination is loaded into your workspace. This is the most important part and the part I missed when trying to do it a couple of times.
For example, if you wish to merge your changes into HEAD, make sure the project is shared with HEAD in your workspace(not the branch you have been working on). To do this, select the project and choose
Team > Replace With > Another Branch or Version
from the context menu. Then select the branch to replace with.From this point, choose
Team > Merge
and then select the branch you want to merge into HEAD.我同意这是相反的,
如果 YOUR_BRANCH 中的更改需要更新到 HEAD,
1) 将更改提交到 YOUR_BRANCH
2)将本地分支交换到HEAD
3) 合并在 YOUR_BRANCH 中进行的 HEAD 更改,
因此您需要在 HEAD 中并从 YOUR_BRANCH 中“获取”更改(而不是将更改从 YOUR_BRANCH 发送到 HEAD)。
I agree this is working other way around,
if changes in YOUR_BRANCH needs to be updated to HEAD,
1) commit changes to YOUR_BRANCH
2) swap local branch to HEAD
3) merge HEAD witch changes made in YOUR_BRANCH
therefore you need to be in HEAD and "take" changes from YOUR_BRANCH (instead of sending changes from YOUR_BRANCH to HEAD).
我只得这么做。 虽然上面的答案很相似,但我发现它们并不具体针对我需要做的事情。
分支或
”,要合并的版本(结束标记)
你想要的源分支
文件来自.
填充“
通用基础版本
”,但如果不是,那么(开始标记)
这将是创建的标签
当分支被创建时。
当您预览更改时,它们将显示在正常的 CVS 同步视图中。 当您合并文件时,它们将作为更改被带入您的本地工作区(之前是您的目标分支)。 此时您需要将它们签入 CVS。
I just had to do this. While the answers above were similar, I found they weren't specific to what I needed to do.
Team -> Merge
. In the dialog box that pops up, choose for "Branch or
", theversion to be merged (end tag)
source branch you want to take your
files from.
populated the "
Common base version
", but if it isn't, then(start tag)
this will be the tag that was created
when the branch was created.
When you preview the changes they will appear in the normal CVS synchronise view. When you merge the files, they will be brought into your local workspace (which from earlier is your destination branch) as changes. At this point you will need to check them into CVS.
我也为此苦苦挣扎,直到我选中“执行合并到本地工作区”单选按钮之前,上述答案都没有帮助。
不幸的是,在两个文件合并之前我无法预览合并。
I struggled with this also and the above answer was not helpful until I checked the "Perform the merge into local workspace" radio button.
Unfortunately, I was not able to preview my merge before the two files were merged.
坦率地说,没有简单、干净的方法,除非您从分支时起就一直在预期和计划这次合并。
但是,我发现了一个完美运行的 hack,它 我在博客文章中描述过。
Frankly, there is no easy, clean way unless you have been anticipating and planning for this merge right from the time you branched.
However, I found a hack that works perfectly, which I've described in a blog post.