Online Help

:: ExamDiff Pro :: Home

This feature is only available in the Master edition of ExamDiff Pro.

Three-Way Diff And Merge

In three-way merge, three files are compared - a base file and two revision files ("yours" and "theirs") that are both modifications of the base - and the goal is to reconcile the changes made in the revision files into an output file. Merge operations are started through the new Merge Files tab in the Compare dialog. In addition to the left ("theirs"), center ("base"), and right ("yours") files, an optional output file can be specified to store the results of the merge operation. If no output file is specified, the output (bottom) pane will be populated with merge results that can be saved to a file.

ExamDiff Pro main window after merge operation

The three-way merge window has three comparison panes and the merge pane underneath. Each comparison pane has a color associated with it (shown in the pane header), and the diff blocks in the merge pane are colored according to which file they were taken from. During the merge operation, ExamDiff Pro both separates the files into blocks and selects the appropriate block to choose for the merge pane. Some blocks cannot be automatically reconciled (because all three files differ): these are denoted as "conflict" blocks and their diff bar is colored red. Conflicts must be manually reconciled, as explained below.

Instead of Added, Deleted, and Changed blocks (as in file comparison), merge uses Matching, Non-Matching, and Conflict blocks.

  • In a Matching block, the left and right files both differ from the center file, but are themselves equal. In other words, the same change from base was made in "theirs" and "yours". ExamDiff Pro selects the right ("yours") file in this case.
  • In a Non-Matching block, either the left or right file differs from the center file, but not both. In other words, the change was only made in one file. ExamDiff Pro selects the file in which the change was made.
  • In a Conflict block, the left and right files both differ from the center files and are not equal to one other. In other words, different changes from base were made in "theirs" and "yours". ExamDiff Pro selects the center ("base") file and marks the block as a conflict. Conflicts must be manually resolved by the user (by selecting which of the three files to choose).

To resolve a conflict, choose the file that you wish to use for the given block and press the diamond button on its diff bar. Alternatively, you can use the Use Left (Theirs), Use Center (Base), Use Right (Yours), Use Left, Then Right, or Use Right, Then Left commands. When a conflict has been resolved, its diff bar color is changed from red to green. These commands can also be used for Matching and Non-Matching blocks, in which case they will override ExamDiff Pro's automatic merge.