“svn merge --reintegrate"和“svn merge --reintegrate"有什么区别?如果我想将一个分支合并到主干上,则 svn 合并而不重新集成 [英] What's the difference between "svn merge --reintegrate" and svn merge without reintegrate if I'd like to merge a branch onto the trunk

查看:43
本文介绍了“svn merge --reintegrate"和“svn merge --reintegrate"有什么区别?如果我想将一个分支合并到主干上,则 svn 合并而不重新集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

svn book 它说 merge--reintegrate 是将所有源 URL 的更改合并到工作副本中".

In the svn book it says merge's --reintegrate is "to merge all of the source URL's changes into the working copy".

我想将一个分支合并回主干.有些地方说在合并时调用reintegrate是绝对必要的"然后之后立即删除分支,我认为这很麻烦.其他地方根本没有提到重新融入.我有 svn 1.6.11.

I would like to merge a branch back to the trunk. Some places say that it's "absolutely necessary" to call reintegrate when merging and then delete the branch immediately afterwards, which I think is a hassle. Other places do not mention reintegration at all. I have svn 1.6.11.

所以我不知道现在该做什么.

So I'm not sure what to do now.

推荐答案

同步合并重新整合合并完全不同.前者用于将父分支上所做的所有更改合并到尚未合并的目标分支(通常是功能分支).后者用于将(特征)分支合并回父分支.基本上这意味着创建(功能)分支的临时克隆,从父分支到临时分支进行同步合并,最后父分支被临时分支替换.换句话说,临时分支包含对(功能)分支和父分支所做的所有更改.

A sync merge is something completely different than a reintegration merge. The former is used to merge all changes made on the parent branch to the target branch (typically a feature branch), that have not already been merged. The latter is used to merge a (feature) branch back into the parent branch. Basically that means a temporary clone of the (feature) branch is created, a sync merge is made from the parent branch to the temporary branch, and finally the parent branch is replaced by the temporary branch. In other words, the temporary branch contains all changes made to the (feature) branch and parent branch.

出于某种原因,一些开发人员不明白其中的区别.因此,SVN 开发人员在 SVN 1.8 中删除了选项 --reintegrate.在此版本中,该工具会自动检测是否应使用同步合并重新集成合并.

For some reason, some developers do not understand the difference. So, the SVN developers removed the option --reintegrate in SVN 1.8. With this version, the tool detects automatically, if a sync merge or a reintegration merge should be used.

如果您使用旧版本,则应使用选项 --reintegrate 进行重新整合合并.请注意,如果您记住一些事情,重新集成后仍然可以使用 (feature) 分支.SVN 的书很好地解释了它:

If you use an older version, you should use the option --reintegrate for reintegration merges. Note that the (feature) branch can still be used after reintegration, if you keep some things in mind. The SVN book explains it well:

这篇关于“svn merge --reintegrate"和“svn merge --reintegrate"有什么区别?如果我想将一个分支合并到主干上,则 svn 合并而不重新集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆