TFS 2010 重命名根分支后合并
我的源代码分支包含近 20000 个文件。几个月前,我创建了一个名为“v2.5TEMP”的分支,它是从“主”主干分支出来的。开发人员在这两个分支机构工作。
然后我将“v2.5TEMP”重命名为“v2.5”。人们一直在开发这个版本,现已发布。我正在尝试从 v2.5 合并到“主”主干,并且看到每个文件都标记为需要合并。
查看过去几个月的签入,代码发生了更改,但并非每个文件都需要合并。似乎重命名分支已将每个文件标记为已更改,现在需要从“v2.5”合并到“Main”。
我不想检查每个文件(20000),或者必须检查历史记录中的每个检查并找出需要合并的内容。
My source code branch contains almost 20000 files. I created a branch a couple of months ago called, "v2.5TEMP", which was branched off the "Main" trunk. Developers were working in both branches.
I then renamed "v2.5TEMP" to simply "v2.5." People have been working on this version which has now been released. I'm trying to merge from the v2.5 into the "Main" trunk, and am seeing every single file marked as requiring a merge.
Looking at the check ins over the past couple of months, there have been code changes, but not every file should need merging. It appears as though renaming the branch has marked each file as having changed and now requiring a merge from "v2.5" into "Main".
I don't want to have to check each and every file (20000), or have to go through each check in history and work out what needs merging.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这就是您在 TFS 中重命名分支时发生的情况。
重命名根文件夹实际上会导致该分支中的每个文件都重命名 - 因此在最终合并时每个文件都会发生冲突。
@ZephanSchroeder 对这个问题的回答 更详细地解释了事情。
请注意,使用自动合并可以正常工作,因此您并不严格需要检查每个冲突。但合并时仍然是一个很大的痛苦,因为你看不到实际发生了什么变化。
我们团队中的开发人员被告知不要重命名分支,因为这不值得以后造成混乱!
Yes, this is what happens when you rename a branch in TFS.
Renaming the root folder effectively results in a rename for every file in that branch - and hence a conflict for every file when it's eventually merged down.
@ZephanSchroeder's answer to this question explains things in more detail.
Note that using Auto Merge will work fine, so you don't strictly need to examine every conflict. But it's still a major pain when merging because you can't see what's actually changed.
Devs in our team have been told not to rename branches, because it's not worth the confusion it causes later!