diff/merge configuration in Team Foundation - common Command and Argument values - MSDN Blogs
One of the extensibility points we have in Team Foundation V1 is that you can configure any other diff and merge tools you want. The purpose of this article is to start collecting the most common ones we know or heard about in a central place so people don't have to figure these out on their own. This UI is available via tools -> options -> source control -> visual studio team foundation server -> "configure user tools" button or via the command-line with "tf diff /configure",Like This:

For additional background, try to remember that there are 2 operations that both involve "merge", so we on the TFVC team have tried to use 2 different terms to help clarify which operation is being talked about.
First, there is "tree merge", which you do via the Merge Wizard in the UI or via the "tf merge" command from the command-line. This operation brings over changesets (or parts of them) from one branch into another (or, in the case of /discard, communicates that you don't want them brought over). Many times those changes will just "come over" - the target will have the changes pended on them and you'll be free to check them in with no manual intervention needed.
Second is "content merge", the operation where you take changes inside an individual file and merge them together to make a final output. This is typically needed when the changes are such that they won't automatically merge together (2 users both changing the same line of a file, for instance), but that's not a requirement.
With this in mind, try to remember that what you're really configuring here is diff and "content merge" tools - the "tree merge" operations are done by TF, the extensibility here is the tool being used for content merging individual files.
We use the SourceSafe-style syntax for argument passing. We don't cover this on our doc page about configuring these diff tools, but these are what the argument parameters mean. Note that we're already adding double-quotes around the parameters (since most of the time, there's at least one temp file involved, at the path to that typically has spaces in it), so you typically don't need to add your own quoting.
- %1 = Original file (in diff, the pre-changes file, in merge, the "server" or "theirs" file, the file that is the base file after "their" changes were applied)
- %2 = Modified file (in diff, the post-changes file, in merge the "yours" file - the base file with "your" changes applied)
- %3 = Base file (in the 3-way merge operation, the file which both "theirs" and "yours" are derived from - the common ancestor. This doesn't mean it's the version the changes were based from, since this may be a cherry-pick merge)
- %4 = Merged file (The output file for the merge operation - the filename that the merge tool should write to)
- %5 = Diff options (any additional command-line options you want to pass to your diff tool - this comes into play only when using "tf diff /options" from the command-line)
- %6 = Original file label (The label for the %1 file)
- %7 = Modified file label (The label for the %2 file)
- %8 = Base file label (The label for the %3 file)
- %9 = Merged file label (The label for the %4 file)
Here are the values we've come up with for various tools. If you have additions/corrections, please email me: jmanning at microsoft.com. I'm keeping these as separate tables since you typically think about configuring either one or the other at a given time.
Compare tools
| Product | Command | Arguments |
|---|---|---|
| TFS default | diffmerge.exe | %1 %2 %6 %7 %5 /ignorespace |
| WinDiff | windiff.exe | %1 %2 |
| DiffDoc (for Word files) | DiffDoc.exe | /M%1 /S%2 |
| WinMerge | winmerge.exe | /ub /dl %6 /dr %7 %1 %2 |
| Beyond Compare | bc2.exe | %1 %2 /title1=%6 /title2=%7 |
| KDiff3 | kdiff3.exe | %1 --fname %6 %2 --fname %7 |
| Araxis | compare.exe | /wait /2 /title1:%6 /title2:%7 %1 %2 |
| Compare It! | Wincmp3.exe | %1 /=%6 %2 /=%7 |
| SourceGear DiffMerge | DiffMerge.exe | /title1=%6 /title2=%7 %1 %2 |
| Beyond Compare 3 | BComp.exe | %1 %2 /title1=%6 /title2=%7 |
| TortoiseMerge | TortoiseMerge.exe | /base:%1 /mine:%2 /basename:%6 /minename:%7 |
| Visual SlickEdit | win\vsdiff.exe | %1 %2 |
Merge tools
| Product | Command | Arguments |
|---|---|---|
| TFS default | diffmerge.exe | /merge %1 %2 %3 %4 %6 %7 |
| KDiff3 | kdiff3.exe | %3 --fname %8 %2 --fname %7 %1 --fname %6 -o %4 |
| Visual SourceSafe | ssexp.exe | /merge %1 %2 %3 %4 %6 %7 |
| Araxis | compare.exe | /wait /swap /a3 /3 /title1:%6 /title2:%7 /title3:%8 %1 %2 %3 %4 |
| Beyond Compare (2-way merge) | bc2.exe | %1 %2 /savetarget=%4 /title1=%6 /title2=%7 |
| WinMerge (2-way merge) | winmerge.exe | /ub /dl %6 /dr %7 %1 %2 %4 |
| Guiffy | guiffy.exe | -s -h1%6 -h2%7 -hm%9 %1 %2 %3 %4 |
| Ellie Computing | guimerge.exe | --mode=merge3 %3 %1 %2 --to=%4 --title0=%8 --title1=%6 --title2=%7 --to-title=%9 |
| SourceGear DiffMerge | DiffMerge.exe | /title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2 |
| Beyond Compare 3 | BComp.exe | %1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9 |
| TortoiseMerge | TortoiseMerge.exe | /base:%3 /mine:%2 /theirs:%1 /basename:%8 /minename:%7 /theirsname:%6 /merged:%4 /mergedname:%9 |
| Visual SlickEdit | win\vsmerge.exe | %3 %1 %2 %4 |
Lionden 2014年12月25日
E-mail:hsdlionden@hotmail.com
转载请注明原文地址和博客园Lionden:http://www.cnblogs.com/lionden/

diff/merge configuration in Team Foundation - common Command and Argument values - MSDN Blogs的更多相关文章
- [转]Resolve Team Foundation Version Control conflicts
本文转自:http://msdn.microsoft.com/en-us/library/ms181432.aspx An advantage of using Team Foundation ver ...
- TF400324: Team Foundation services are not available from server…
Quick Fix As a quick fix you can Close Visual Studio and related apps Browse to %LocalAppData%\Micro ...
- 使用 Team Foundation 版本控制命令
使用 Team Foundation 版本控制命令 Visual Studio 2013 其他版本 Visual Studio 2010 Visual Studio 2008 Visual Stu ...
- Team Foundation Server 2013 with Update 3 Install LOG
[Info @10:14:58.155] ====================================================================[Info @ ...
- Integrate SharePoint 2013 with Team Foundation Server 2012
Now that SharePoint 2013 is out I want to make sure that I can integrate SharePoint 2013 with Team F ...
- Team Foundation 中的错误和事件消息
Visual Studio Team System Team Foundation 中的错误和事件消息 Team Foundation 通过显示错误消息和事件消息来通知您操作成功以及操作失败.一部分错 ...
- TF255466: Team Foundation Server 的配置过程无法继续。以前的更新或安装需要重
在验证是否可以安装 SharePoint 时的提示,Error [ System Checks ] TF255466: The configuration process for Team Found ...
- In-Place upgrade to Team Foundation Server (TFS) 2015 from TFS 2013Team Foundation Server TFS TFS 2015 TFS upgrade TFS with Sharepoint
This upgrade document gives detailed step by step procedure for the In-Place upgrade from TFS 2013 t ...
- 【原创】Team Foundation Server 域环境迁移
先说下此片博客的上下文:部门所在的业务被集团出售,因此我们所有的计算机和服务器都得重新命名,退出当前域加入新公司的域.对于PC和其他服务器,目前不存在太大问题.但是对于Team Foundation ...
随机推荐
- Net设计模式实例之适配器模式(Adapter Pattern)
一.适配器模式简介(Brief Introduction) 适配器模式,将一个类装换成客户期望的另外一个接口.Adapter模式使的原本由于接口不兼容而不能工作的那些类可以一起工作. 二.解决的问题( ...
- 6.Configure Domain Classes(配置领域类)【EF Code-First 系列】
在前面的部分中,我们学习了Code-First默认约定,Code-First使用默认的约定,根据你的领域类,然后生成概念模型. Code-First模式,发起了一种编程模式:约定大于配置.这也就是说, ...
- 11.Configure Many-to-Many(配置多对多关系)【Code-First系列】
现在学习EF Code-First多对多的配置. 这里我们举例:学生和班级实体,一个学生可以选修多个课程,多个学生也可以选修同一个课程. 一.使用数据注解特性,配置多对多的关系 using Syste ...
- SQL常见的系统存储过程
1.sp_datebases 列出服务器上的所有数据库信息,包括数据库名称和数据库大小 例:exec sp_datebases 2.sp_helpdb 报告有关指定数据库或所有数据库的信息 例:exe ...
- Buff系统设计
我就随便一写,你也就随便一看吧. 什么是BUFF? 或许直接回答这个问题,那么你收获到的答案将是五花八门的.这个问题暂时放下不谈,我们可以去看其他的游戏应该是怎么设计的. 我经常玩的游戏里边B ...
- [Bug]2016-02
1.0 反序列化时的对象属性类型定义错误. 字符串类型用整型接收.(导致一直反序列化失败.) 2.0 HttpWebRequest myReq = (HttpWebRequest)HttpWebReq ...
- Redis命令拾遗四——集合类型(命令补充)
补充下上篇文章集合的命令. 上篇地址 博客园蜗牛 http://www.cnblogs.com/tdws/p/5785939.html SCARD Key获得执行集合中元素的数量. SDIFFSTOR ...
- ROWNUMBER() OVER( PARTITION BY COL1 ORDER BY COL2)用法,先分组,然后在组内排名,分组计算,主表与附表一对多取唯一等
ROWNUMBER() OVER( PARTITION BY COL1 ORDER BY COL2)用法 今天在使用多字段去重时,由于某些字段有多种可能性,只需根据部分字段进行去重,在网上看到了row ...
- No.021:Merge Two Sorted Lists
问题: Merge two sorted linked lists and return it as a new list. The new list should be made by splici ...
- Linux中shell脚本自动输入密码
最近遇到蛋疼的事,就是在shell脚本中需要获取root权限,因此在shell脚本运行过程中需要输入密码. 懒惰的我当然想让shell在执行过程中就可以自动输入密码,这样就可以抽空看看妹子图.. 我通 ...