diff/merge configuration in Team Foundation - common Command and Argument values

简介:

diff/merge configuration in Team Foundation - common Command and Argument values

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"

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

Published Monday, February 20, 2006 11:49 AM by jmanning 

http://blogs.msdn.com/jmanning/articles/535573.aspx

本文转自斯克迪亚博客园博客,原文链接:http://www.cnblogs.com/sgsoft/archive/2009/02/02/1382359.html,如需转载请自行联系原作者




相关文章
|
3月前
ESLint—— Failed to load config "standard" to extend from
ESLint—— Failed to load config "standard" to extend from
78 0
|
5月前
|
编译器
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
|
前端开发 5G
Search space set group switching(一)
根据R17 38.300的描述,UE可以通过PDCCH monitoring adaptation机制实现power saving的目的,这其中就包括PDCCH monitoring skipping和search space set group (SSSG) switching两种机制。PDCCH monitoring skipping是R17才提出的机制,就是UE 可以在PDCCH skipping的时间内不监视 PDCCH的功能;search space set group (SSSG) switching R16提出,R17进行了部分增强。
|
Kotlin
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
126 0
Program type already present: org.intellij.lang.annotations.Flow\Program type already present: org.i
|
TensorFlow 算法框架/工具
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
MGA (Managed Global Area) Reference Note (Doc ID 2638904.1)
326 0
|
算法
On the Correct and Complete Enumeration of the Core Search Space
在之前的文章中我们讨论了基于graph的DP-based算法,来解决join ordering的枚举问题。 这些DP算法通过join predicate描述的连通性,解决了枚举可能的表组合问题,但join graph本身(即使hypergraph)是无法完整的描述join语义的,因为连通边本身无法描述不同类型的join语义,例如left outer join/semi join/anti join...,因此即使找到了所谓的csg-cmp-pair,也不一定是有效的plan。 这篇paper讨论的就是这个问题,当枚举出一个csg-cmp-pair (S1 o S2),如何判断这是有效的join
448 0
On the Correct and Complete Enumeration of the Core Search Space
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, se
错误提示: Severity Code Description Project File Line Suppression StateError This project references NuGet package(s) that are missing on this computer.
1037 0
|
开发工具 Android开发 Go
RN Exception: Before building your project, you need to accept the license agreements and comp le...
异常 * What went wrong: A problem occurred configuring project ':app'. > You have not accepted the license agreements of the fol...
1655 0