当文件夹结构发生变化时如何合并我的文件
我想要执行主要的代码库重组,但除非我可以提供一种方法,使主干修复能够轻松应用于重组之前采取的分支,否则我无法继续。
我正在考虑的一种方法是将重组应用于所有支持分支,但这可能会破坏稳定。
首选方法是提供一个可以考虑更新的文件位置的合并工具。关于我如何实现这一点有什么建议吗?
I want to perform a major codebase reorganization, but I'm unable to proceed unless I can provide a way for trunk fixes to be easily applied to branches that were taken before the reorganization.
One approach I was considering was to apply the reorganization to to all of the support branches, but this is potentially destabilising.
A preferred approach would be to provide a merge tool that can take into account the updated file locations. Any suggestions on how I could implement this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的问题是,为什么要将重组合并回分支机构?分支背后的想法是它们(通常)是维护模式(例如主干是版本 4,你需要返回并修复版本 3,你在版本 3 分支中执行此操作),或者让人们做一些他们需要的副业。不一定想立即放入后备箱。
如果您正在对代码库进行彻底的重组,那么这听起来是打破代码中某些向后依赖关系的好时机。如果您不这样做,您可能会限制您实际可以完成的重构。
My question would be, why do you want to merge a reorganization back into branches? The idea behind branches is that they are (typically) maintenance mode (e.g. trunk is version 4 and you need to go back and fix version 3, you do so in the version 3 branch), or for people to do some side work that they don't necessarily want to have in the trunk right away.
If you are doing a complete re-org of the codebase, that sounds like a good time to break some backwards dependency in code. If you don't do this, you may be limiting what refactoring you can actually accomplish.
我处于同样的情况,分支并不总是与维护相关或与修补程序相关。我们经常必须维护多个活跃的稳定分支,并且必须在它们之间进行合并。我们没有足够的混合范围来在主干上练习持续集成。
我们诉诸于在更细粒度的级别上执行合并。如果移动了文件夹,请直接从一个分支中的旧位置到另一分支中的新位置执行合并。我还强烈建议您使用“svn move”进行原始重组,它确保祖先被理解。
不管怎样,这都不是令人愉快的,而且非常手动。保留良好的记录。
I'm in the same situation where branches aren't always just maintenance related nor hotfix related. We often have to maintain multiple active stabilization branches and must merge between them. We don't have the luxury of mixing scope to practice continuous integration on a trunk.
We resort to performing merges at a more granular level. If a folder is moved, perform the merge directly from the old location in one branch to the new location in the other branch. I'd also highly recommend that you use the "svn move" to do the original restructure, it ensures ancestry is understood.
Either way, it's not pleasant and very manual. Keep good records.