Merge supports folder hierarchy comparison and synchronization, enabling you to compare and merge entire directory trees. This is ideal for detecting changes in different versions of source code or web pages. You can even use the efficient byte-by-byte comparison option to verify the contents of recordable CDs or USB thumbsticks.
If you haven’t already, spending a few moments browsing the Instant Overview of Folder Comparison and Synchronization will help you quickly become familiar with Merge folder comparisons.
Starting a comparison
To open a new folder comparison:
- click the New Folder Comparison toolbar button;
- or, select the File▸New▸New Folder Comparison menu item;
- or, press Shift+Cmd+F.
The layout of the folder comparison window is very similar to that of the file comparison window.
Specifying the folders to compare
Enter the paths to the folders you want to compare into the entry fields at the top of the window, or use the Browse and Show history buttons. If there are other versions of the folder named in the entry field available for comparison (e.g. in Time Machine), the Versions button displays a list of these other versions. If this button is not enabled, check the options set in the Versions preference page.
You can also drag and drop folders from Finder on to the entry fields in the folder comparison window or on to the folder comparison area itself.
When you have chosen two folders to compare, to perform the comparison:
- click the Start or Recompare toolbar button, alternatively press Enter;
- or, select the File▸Start or Recompare menu item, alternatively press Cmd+R;
- or, drag and drop folders from Finder on to the filename entry fields or on to the file panes.
You do not need to wait for the folder comparison to complete before viewing or using the results of the comparison.
As well as folders on the local disk and network volumes, Merge is also able to directly access and compare folder hierarchies within Perforce and Subversion repositories. See Virtual File System (VFS) Plugins for more details.
Accessing other revisions of a folder with the Versions button
If there are other versions of the folder named in the entry field available for comparison, the Versions button displays a list of these other versions. You can open the same file or folder in both the left and right comparison panes, then use this button to compare a folder with another revision of itself.
If enabled on the Preferences…▸Application▸Versions page, Merge is able to find other versions of a folder from the following sources:
Time Machine. Merge automatically searches the currently configured Time Machine backup disk to find any older versions of the folder you are comparing. If the Time Machine disk is a network volume, Merge will endeavour to mount it.
Time Machine backups will not occur while a Time Machine password-protected network volume is mounted by Merge. To allow Time Machine to make backups to the volume, eject the Time Machine network volume using Finder.
- Subversion repositories. Merge endeavours to find any older versions of the folder you are comparing from the relevant Subversion repository. If a Subversion URI has been specified in the folder name entry field, Merge will search the repository from which it accessed the folder for any older revisions. Otherwise, if a folder has been loaded from the local disk or a network volume and is part of a client workspace, Merge will search the relevant repository for which credentials have been supplied on the Credentials preference page.
Three-way folder comparisons
The folder comparison display
The screenshot above shows the results of a typical comparison between two folders. Background colours are used to indicate the inserted, removed, changed, or unchanged state of each file or folder in the results list. The icon of the newest file in any given row is indicated by a red dot adornment. You can step between insertions, removals and changes using the Previous Change and Next Change toolbar buttons.
The folder comparison results list has a context menu that contains the most commonly used commands in the folder comparison window. Right-click within the results list to display the menu. Some of the commands in the menu will change depending on whether you click in the left or right side of the list.
You can use the controls in the Fonts/Colours preferences page to change the colours that are used for inserted, removed, changed and unchanged files and folders.
To turn the display of sizes and last modified timestamps on and off, click the Preferences toolbar button and select Show Timestamps and Sizes. You can also select the View▸Show File Sizes and View▸Show Modification Dates menu items.
The numbers in each Changes column show you the number of changes that have been made between the files in the two adjacent columns. For three-way folder comparisons, the third Changes column indicates the number of changes between the first and third folder hierarchies. You can toggle this column on and off using the Changes Column command in the View menu. Other symbols can appear in the changes column to indicate errors encountered while processing the files in a row, or to indicate that a row is filtered out by option settings. In either case, hover the mouse pointer over the symbol for more information about what it represents.
You can adjust the widths of the columns in the results list by dragging the column heading dividers from side to side.
Selecting files and folders
- Use the menu items in the Select Rows toolbar button or Actions▸Select Rows menu to select files and folders based on criteria you specify;
- Click on an item to select it and deselect any other selected items;
- Hold down Cmd and click on an item to add or remove it from the current selection;
- Hold down Shift and click on an item to extend the selection to that item;
- Press Cmd+A to select all the files in the results list;
- Use the controls in the Folder Comparison Row Selection window to select files and folders. This window can be shown by clicking the Select Rows toolbar button and selecting Select by State…. You can also select the Actions▸Select Rows▸Select by State… menu item.
Launching file comparisons
The results list can be used to launch file comparison windows for selected rows of files. Please see the Launching File Comparisons topic for more information.
Launching folder comparisons
You can double click any row containing folders to open a separate folder comparison window to compare those folders.
Deleting files and folders
To delete items in the folder comparison window, select the files and folders that you want to remove, right-click, and use the Delete Selected Items in Column item in the context menu. You can undo a deletion by restoring the deleted files and folders from the macOS Trash.
Alternatively, the Actions▸Delete Selected menu item deletes all two/three way selected items, not just those in the column.
Some files and folders (particularly those located on network volumes) cannot be sent to the Trash. Merge will let you know if this occurs and will provide you with an opportunity to delete the files and folders permanently.
Hiding files and folders
You can hide files and folders in the results list by selecting them and then clicking the Hide Reveal toolbar button and selecting Hide/Reveal Selected. You can also select the Actions▸Hide/Reveal▸Hide/Reveal Selected menu item, or press Ctrl+Cmd+H. You can later show all hidden items using the Show Hidden Items menu item on the same menus.
Note that hidden items are not excluded from subsequent folder comparison operations. They will still be compared, but will not appear in the results list until you use the Show Hidden Items menu item.
Excluding files and folders from a comparison
You can specify wildcard expressions to exclude files and folders from the folder comparison. Files and folders that are excluded in this way will not be compared and will not appear in the results list even when you choose the Show Hidden Items menu item. You can use this feature to exclude large binary files or entire folder hierarchies from the comparison.
Bookmarks and comments
As you are comparing or editing folders, you may want to set bookmarks to enable you to return to locations of interest later on. Click the Bookmarks toolbar button and select Toggle Bookmark, to toggle a bookmark on or off on the current line. You can also select the Edit▸Bookmarks▸Toggle Bookmark menu item, or press Cmd+F2.
To navigate between bookmarks, click the Bookmarks button and select Next Bookmark or Previous Bookmark. You can also select Next Bookmark or Previous Bookmark from the Edit▸Bookmarks menu, or press F2 or Shift+F2.
Comments can be added to bookmarks, making it easy to note important information or to record a question. To edit a bookmark’s comment, click the Bookmarks toolbar button and select Edit Comment…. You can also select the Edit▸Bookmarks▸Edit Comment… menu item, or right-click the bookmark and choose the Edit Comment… menu item. Bookmark comments are shown as tooltips when you hover the mouse pointer over a bookmark.
Bookmarks and comments are included when you save a comparison for archival or team collaboration. Bookmark comments are also shown in HTML comparison reports. They are therefore a useful tool for asking questions or making notes in a comparison that will later be emailed to other team members for review.
Customizing folder comparisons
There are a variety of options that can be adjusted to change the way that Merge performs folder comparisons. These options are discussed in the Preferences topic.