Configuring a Merge Tool

To associate an external merge Tool with the Teamprise Merge task open the Preferences dialog located under the Teamprise Tools menu. Select Merge Tools. Complete the following steps:

  1. Click the Add button in the Preferences | Merge Tools dialog. If you already have an assigned editor you can click Remove or Edit. The Add Merge Tool dialog appears.

  2. In the Add Merge Tool dialog enter a file type in the File Extension field. For example, you may want to configure one merge tool for all java files and a different merge tool for all html, xml files, and so forth.
    Note: You can enter * as a wildcard, meaning all extensions

    In the Command field, type the path to the editor you wish to associate with the specified file type. If you click Browse, you can navigate to the editor location on your file system.

    In the Arguments field you will need to specify the passing arguments. (Each merge tool has its own way of passing arguments, but most use the four "required substitution parameters" listed on the dialog, in some order.) These required parameters must be listed in the Arguments field.

  3. Review the following example which shows how to configure the Add Merge Tool when associating the KDiff3 editor with java files. KDiff3 specifies its arguments as the baseline file first, then the left (local) file, then the right (server) file, then "-o outputfile" for where it saves the merge. Thus, the arguments are "%3 %2 %1 -o %4"

    KDiff3 also allows you to pass labels for each file. (This is where the "Optional substitution parameters" come into play.) Without passing labels, KDiff3 will simply show you the filenames, which are temporary files with hard-to-read names. If configued to use labels, then the Teamprise will pass file identifiers to KDiff3; for example, file.java (Server Version, 1551).

    For KDiff3, you pass the optional parameters:

    %3 %2 %1 -o %4 --L1 %8 --L2 %7 --L3 %6

    This means %8 is the label for file %3, %7 is the label for file %2, %6 is the label for file %1

    If you configure KDiff3 using the optional parameters, then the dialog looks like this:

    Once you have a Merge Tool configured, the next time Teamprise prompts you to Resolve a Conflict, you can choose the option to merge changes with your external merge tool.


See Related Tasks:

Resolving version conflicts with Teamprise Merge
Setting Teamprise Preferences