当主干过时时,颠覆将分支合并到主干中
分支已经成为最新的开发线,因此主干已经过时了。当通过“合并两棵不同的树”将分支合并回主干时,分支中的任何更改历史都不会移动到主干。我想摆脱该分支,因为我需要启动一个新分支进行一些修改,这将需要一些时间。这是正常行为还是我错过了什么?
任何建议都将不胜感激。
谢谢! 米格尔
A branch has become the most current line of development so the trunk was outdated. When merging the branch back into trunk through "Merge two different trees", none of the history of the changes in the branch are moved to the trunk. I would like to get rid of the branch, since I need to start a new branch for some modifications that will take some time. Is this the normal behavior or did I miss something?
Any suggestion is greatly appreciated.
Thanks!
Miguel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分支的全部目的是获取存储库的副本,该副本可以在主干保持稳定(因此“过时”)的情况下向前推送。有人可能会说,如果分支真的成为主要分支,那么“你就做错了”。
不过,除了语义之外,我看到了解决您问题的一种可能的解决方案。
将主干合并到分支中,而不是相反。这可能会很困难,具体取决于对主干所做的哪些更改没有主动合并到分支中。最后,删除 /trunk,并将分支的 SVN 副本复制到 /trunk。请记住,SVN 中的“分支”实际上只是您正在分支的任何内容的副本,包括历史记录。如果您不确定这将如何进展,您可以对存储库执行 svndump 并在临时存储库上进行测试。
The whole point of branching is to get a copy of the repository that can be pushed forward while the trunk remains stable, and therefore 'outdated'. One might argue that if the branch really becomes the primary, then 'you're doing it wrong'.
Semantics aside though, I see one possible solution to your problem.
Merge the trunk into the branch, instead of the otherway around. This may prove difficult depending on what changes may have been made into the trunk that were not pro-actively merged into the branch. And then, in the end, remove /trunk, and do an SVN copy of the branch to /trunk. Remember that 'branching' in SVN is really just a copy of whatever you are branching, history included. If you are unsure of how this might progress, you could do an svndump of the repo and test it out on a temporary repository.