PrestoSoft Blog :: Home

Monday, July 22, 2013

Two-Way Merge Coming in the next ExamDiff Pro

The biggest new feature that's coming to the next version of ExamDiff Pro Master Edition is two-way file merge.

Two-way file merge is a new mode that shares characteristics with both file comparison and three-way file merge. Like two-way comparison, two-way merge involves only two files, and differences are separated into added, deleted, and changed blocks (as opposed to matching, non-matching, and resolved blocks, as in three-way merge). However, two-way merge differs from two-way comparison in that rather than directly editing the files being compared, the goal is to create an output file out of the two input files.

Two-way merge is useful for reconciling changes in a version control system that doesn't provide the base file, or when you need to reconcile the differences between two separate files.

To perform two-way merge, open the Merge Files tab (available in the Master Edition only) in the Compare dialog and specify a left ("theirs") file and right ("yours") file, but no center ("base") file. You can optionally specify an output file: if you don't specify one, then you will simply be prompted for the output file location when you save the output pane results.

After clicking Merge, the results will look like this:

As you can see, the two-way merge layout is similar to the three-way merge layout, except with only two panes on top.

Now that the results are shown, the next step is actually merging the files. Unlike in three-way merge, ExamDiff Pro does not automatically try to merge any changes in two-way merge - this is because the lack of a base file means that there is no reasonable way to determine which file's changes should be kept for each conflict. This means that all conflicts need to be resolved manually.

Fortunately, ExamDiff Pro makes resolving conflicts easy. 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 Merge | Select Left File or Merge | Select Right File commands (or their corresponding toolbar buttons). When a conflict has been resolved, its diff bar color is changed from red to green.

The status bar keeps track of how many unresolved changes remain. When the count reaches zero, you're done!

Labels: ,


Post a Comment

Links to this post:

Create a Link

<< Home