HOME

EXAMDIFF PRO

FTPVC

BLOG

FORUMS

NEWS

SUPPORT

ABOUT US

TRY IT TODAY!

PURCHASE

Integrating ExamDiff Pro with Version Control Systems

Using ExamDiff Pro as an External Diff Tool

ExamDiff Pro's command-line interface makes it easy to use it as a diff tool in version control applications. The syntax is

ExamDiff.exe [File1] [File2] [Options]

and there are several options that may be helpful when using ExamDiff Pro in a version control context:

The -nh option prevents the compared files from being added to ExamDiff Pro's history, which is handy because, since you're comparing temporary files, it wouldn't make sense to remember them. You can read more about this option here.

The -dn1:name and -dn2:name set the display names of the files being compared. They can be helpful if you don't want to see ugly temp file paths and your version control program sends file labels as parameters.

The -sn1:name and -sn2:name specify the file names used when saving each file. These options are useful if you want to use ExamDiff Pro as an external merge tool.

Below you'll find examples of how to integrate ExamDiff Pro into some popular version control applications. Is your version control tool of choice not listed? Let us know and we can put up a tutorial for it.

Using Version-Control Commands from ExamDiff Pro

Sometimes you may want to perform version control operations on files or directories that you are comparing in ExamDiff Pro. For instance, you may be editing a file that hasn't been checked out yet and wish to check it out before saving it, or you may be copying files from an external drive and wish to check out the destination files before copying.

Many version control systems (such as ClearCase, TFS, etc) can integrate with the Windows shell, and you can access Windows Explorer commands in ExamDiff Pro either by right-clicking on a file or directory and selecting Explorer Menu, or by holding down the Shift key as you right-click on a file or directory.

Integration Settings For Common Version Control Systems

ClearCase

Open the C:\Program Files\Rational\ClearCase\lib\mgrs\map file (your path may differ) and edit the following line to point to ExamDiff.exe:

    text_file_delta xcompare <Path to ExamDiff.exe>

Git

In your Git command window, enter the following commands:

    git config --global diff.tool edp
    git config --global difftool.edp.cmd "\"<Path to ExamDiff.exe>\" \"$LOCAL\" \"$REMOTE\"" -nh
    git config --global difftool.prompt false

Mercurial

Open the Mercurial configuration file at %USERPROFILE%\Mercurial.ini and add or edit the following lines:

    [extensions]
    extdiff =
  
    [extdiff]
    cmd.edp = <Path to ExamDiff.exe>
    opts.edp = -nh

You can now launch comparisons with:

    hg edp

Perforce

Instructions for P4

Add the environment variable:

    P4DIFF=<Path to ExamDiff.exe>

Instructions for P4V

Go to Edit | Preferences | Diff. Change the Default Application option to "Other application", and for Location enter the path to ExamDiff.exe .

Instructions for P4Win

Go to Settings | Options | Files | Diff. Select User supplied diff application and browse to ExamDiff.exe . Check Options args and enter:

    %1 %2 -dn1:"%L" -dn2:"%R" -nh

StarTeam

Go to Tools | Personal Options | Files. Click the Alternate Applications button if present. Check Comparison Utility. Enter the path to ExamDiff.exe, and for Options write:

    $file1 $file2 -nh

Subclipse

In Eclipse, go to Window | Preferences | Team | SVN | Diff/Merge, then under Conflict Resolution Program select External. Browse for ExamDiff.exe, and for Parameters write:

    ${theirs} ${base} -nh

Surround SCM

Go to User Options | Diff/Merge. Add or edit an entry with the following settings and click OK.

File extensions: All other text files
Diff/Merge: Diff
Compare with: Selected application
Selected application: <Path to ExamDiff.exe> "%1" "%2" -nh

Team Foundation Server

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

Extension: *
Operation: Compare
Command: <Path to ExamDiff.exe>
Arguments: %1 %2 -nh -dn1:%6 -dn2:%7

Visual SourceSafe

Go to Tools | Options | Custom Editors. Enter the following and click Add.

Operation: File Difference
Extension: .*
Command Line: <Path to ExamDiff.exe> %1 %2 -nh