Visual Studio TFVC 合并行未对齐 [英] Visual Studio TFVC Merge Lines Misaligned

查看:21
本文介绍了Visual Studio TFVC 合并行未对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 Visual Studio 2017 与 Team Foundation 版本控制 (TFVC) 结合使用.我正在尝试将父分支的更改合并到子分支中,但是我遇到了大量不应该存在的冲突.compare 函数工作正常,显示出一手充满差异的手,但合并工具正试图将 2 组代码像一副纸牌一样混在一起.太糟糕了,我觉得手动更改会更安全.

有没有办法帮助合并工具识别可比较的代码行?

解决方案

你可以试试外部的Compare amd Merge Tools,例如

I am using Visual Studio 2017 with Team Foundation Version Control (TFVC). I am trying to merge changes from a parent branch into a child, but I am getting tons of conflicts that shouldn't exist. The compare function works fine and shows a hand full of difference, but the merge tool is trying to shuffle the 2 sets of code together like a deck of cards. It's so bad, I would feel safer making the change manually.

Is there a way to help the Merge Tool identify the comparable lines of code?

解决方案

You can try the external Compare amd Merge Tools, e.g WinMerge, ExamDiffPro or Beyond Compare.

For example:

Using Beyond Compare as an External Merge Tool:

Go to Tools | Options | Source Control | Visual Studio Team Foundation Server, then click Configure User Tools and then Add. Enter the following:

Extension: *
Operation: Merge
Command: <Path to BCompare.exe>
Arguments: /merge %1 %3 %2 /o:%4 /dn1:%6 /dn2:%8 /dn3:%7 /dno:%9 /nh 

Then it will invoke the external compare and merge tool when you click Merge Changes in Merge Tool to resolve the conflicts. And based on my test it can identify the comparable lines.

For ExamDiff, you can reference : Using ExamDiff Pro as an External Diff Tool

这篇关于Visual Studio TFVC 合并行未对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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