Automatic Folder Merging

Folder comparisons support the automatic merging of folders into a common ancestor folder, in a similar manner to file comparisons. The first and third folders will typically be independently modified copies of the common ancestor (middle) folder.

Information Please see Three-Way File Comparisons for information about the general circumstance that may result in three distinct revisions of a set of files needing to be combined.

Performing an automatic merge

The automatic merging operation will merge changes from the first and third folders back into the common ancestor folder. The operation can involve removal, copying, and automatic merging of files.

To perform an automatic folder merge:

  • Perform a folder comparison between three folders. Merge will assume that central folder is the common ancestor of the first and third folders.
  • Make a backup copy of the common ancestor folder. Merge cannot undo changes that it makes to the contents of the common ancestor folder.
  • Select the rows in the folder comparison results list that you want to include in the automatic merging operation. You can select all files in the list by pressing Cmd+A. Note that the automatic merge operation will ignore any selected folders.
  • Click the Merge to Common Ancestor toolbar button to review what will be done by the merging operation.
  • Review the proposed actions in the Merge to Common Ancestor sheet. Click the Merge button to begin the operation.
  • Merge will perform the merging operation, reporting any errors or warnings as they are encountered.

Understanding automatic merge results

When an automatic merge completes, the folder comparison window is updated to show what happened.

Information If you have enabled the option to Hide Unchanged Rows in the ActionsHide/Reveal menu or Hide Reveal toolbar menu, rows that are now unchanged as a result of the merging operation will disappear from view.

Rows that were successfully merged will show a resolved marker MarkerResolved , and the relevant filenames will be dimmed.

Edit markers indicate the nature of each change:

  • For files copied into the common ancestor, the row is marked with an arrow ( or ) indicating the folder hierarchy (right or left) from which the files were copied.
  • For files removed from the common ancestor, a delete marker is placed on the row after the position from which the files were removed.
  • For files that have been automatically merged to the common ancestor, the row is marked with .

To navigate between edit markers:

  • click the Next Edit and Previous Edit toolbar buttons;
  • select the EditMarkersNext Edit and EditMarkersPrevious Edit menu commands;
  • or, press F3 and Shift+F3.

A conflict marker is attached to files that either could not be merged due to merging conflicts or unexpected errors. In either case, the marker’s comment will describe the problem.

To navigate between conflicts:

  • click the Next Conflict and Previous Conflict toolbar buttons;
  • select the MergingNext Conflict and MergingPrevious Conflict menu commands;
  • or, press F4 and Shift+F4.

Each , , , or marker has an associated tool tip that explains what change was made. Conflict markers also have a tool tip to explain the reason for the conflict. Hold the mouse cursor over the marker for a few seconds to see the explanation. Alternatively, right-click on the edit marker and select Edit Comment… from the context menu.

Files that could not be merged automatically due to merging conflicts should be merged manually using a file comparison.

How automatic merges work

The following rules define what will happen to selected files during an automatic merging operation:

First Folder Second Folder Third Folder Action
File Copy the file to the second folder.
File Delete the file.
File File If the files are unchanged then remove the file in the second folder, otherwise mark it as a conflict.
File Copy the file from the first folder to the second folder.
File File Merge the files in the first and third folders into the second folder. *
File File If the files are unchanged then remove the file in the second folder, otherwise mark it as a conflict.
File File File Merge the files in the first and third folders into the second folder. *

* Files are only merged if they are considered to be text files.