Diff/merge configuration in team Foundation-common command and argument values

Source: Internet
Author: User
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 ). several 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 inserting ing 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 processing ing 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 shocould write)
  • % 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 processing ing 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% 7

Kdiff3
Kdiff3.exe
% 3 -- fname % 8% 2 -- fname % 7% 1 -- fname % 6-o % 4

Visual sourcesafe
Ssexp.exe
/Merge % 1% 2% 3% 4% 7

Araxis
Compare.exe
/Wait/SWAP/A3/3/title1: % 6/title2: % 7/title3: % 8% 1% 2% 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% 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,200 6 am by jmanning

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.