重新集成到 Subversion (SVN) 中的分支(而不是主干)
我知道 Subversion (SVN) 1.6 中有一个 --reintegrate
选项可以将功能分支合并回主干。
我的工作流程有点复杂:
我们有功能分支 - 我们经常将主干合并到它们。但我们不会立即将它们放回行李箱。相反,我们在主干上创建一个发布分支,并将功能分支合并到发布分支。此时,我们遇到了很多树冲突(因为功能分支和主干中都存在很多更改)。
选项 --reintegrate
在这种情况下必须有所帮助,但看起来 --reintegrate
在合并到主干以外的分支时不起作用。这是真的吗?
I know there is the --reintegrate
option in Subversion (SVN) 1.6 to merge a feature branch back to the trunk.
My workflow is a little more complex:
We have feature branches - we merge trunk to them often. But we don't put them back to trunk right away. Instead we create a release branch off the trunk, and merge feature branches to release branch. At this point we get a lot of tree conflicts (since lot of changes exist both in feature branch and the trunk).
Option --reintegrate
must help in this scenario, but it looks like --reintegrate
doesn't work when merging to the branch other than trunk. Is that true?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对我来说,除了
trunk
之外,您不能在任何分支上使用--reintegrate
选项,这对我来说是个新闻。 Subversion 在命名或分支放置方面没有任何标准,因此trunk
不可能是特殊的。对于 Subversion,branches
、trunk
和tags
只是目录。这些目录对我们来说只是特殊的,因为我们是这么说的。--reintegrate
选项与以下事实有关:如果我从分支 A 合并到分支 B,然后尝试从分支合并回来分支 B 到分支 A,我可能会尝试将内容合并回最初位于分支 A 的分支 A >。--reintegrate
选项让 Subversion 知道我正在反转合并的方向,并且不考虑分支 B 中的内容,这实际上是从分支 < 合并的结果em>A。重新集成是任何实际跟踪合并更改的版本控制系统中的一个问题。无论如何,
--reintegrate
没有理由必须涉及名为trunk
的分支。否则,就没有真正需要该选项。 Subversion 所要做的就是看到您正在合并到一个名为trunk
的分支,并意识到这可能是一次重新集成。It's news to me that you can't use the
--reintegrate
option on any branch besidestrunk
. Subversion doesn't have any standard on naming or the placement of branches, so there's no way thattrunk
is special. To Subversion,branches
,trunk
, andtags
are mere directories. These directories are only special to us because we said so.The
--reintegrate
option has to do with the fact that if I merge from branch A to branch B, and then try to merge back from branch B to branch A, I might be attempting to merge stuff back to branch A that was initially in branch A. The--reintegrate
option lets Subversion know that I am reversing the direction of my merge, and to not consider stuff in branch B that was really the result of merging from branch A.Reintegration is an issue in any version control system that actually tracks merged changes. In any case, there's no reason why
--reintegrate
must involve a branch calledtrunk
. Otherwise, there's no real need for the option. All Subversion has to do is see you're merging into a branch calledtrunk
and realize it's probably a reintegration.