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. It may also be helpful to review the Making the Most of the Ribbon topic.
Starting a comparison
To open a new folder comparison:
- Click the New folder comparison button in the quick-access toolbar (in the window caption area above the ribbon);
- Or, choose the New folder comparison item in the drop-down menu of the leftmost ribbon item.
- Or, if you are already viewing a folder comparison, click the New folder comparison button in the ribbon.
- Or, press Ctrl+D.
The layout of the folder comparison window is very similar to that of the text 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 comparison tab, or use the Browse and Show history buttons. The Browse button opens a folder-browsing window and the Show history button displays a drop-down list of folders that you have recently compared. If you hold down the Ctrl key when selecting a folder from the drop-down list, Merge will fill the folder name fields for the other folder panels with their corresponding historical values. You can also drag and drop folders from Windows Explorer on to the entry fields in the folder comparison window.
When you have chosen the two folders to compare, click the Start or recompare button in the ribbon, or press the Enter key while one of the folder name entry fields has focus.
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 access and compare folder hierarchies directly within Perforce and Subversion repositories. See Virtual File System (VFS) Plugins for more details.
Comparing archive files as if they were folders
Merge has built-in support for a variety of archive formats (
.tar, etc.) – see the Scan contents of archives (.zip, .jar, .tar, etc.) option documentation for a complete list. Enhanced support for
.7z archives can also be provided by installing the free third-party 7-Zip application and enabling the corresponding Merge option.
If you have already performed a folder comparison and have a row of results that contains two (or three) corresponding archive files, simply double-click that row to launch a new folder comparison tab to compare the contents of those archives.
You can also enter an archive file path directly into the folder entry field at the top of the folder comparison tab. For example, you could enter the archive file
Note that you can compare the contents of an archive to a normal folder. This can be useful to verify the contents of a newly created archive, or to see which files have changed since its creation.
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.
When the options window Application▸Show file versions from SCM systems option is checked, Merge endeavours to find any other versions of the folder you are comparing from the relevant configuration management system repository. If a Perforce, Subversion, Mercurial, or Git URI has been specified in the filename entry field, Merge will search the repository from which it accessed the folder for any other 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 options page.
If the options window Application▸Show file and folder versions from System Restore option is checked, Merge will show any versions of the folder you are comparing that have been stored by Windows System Protection or the Araxis Snapshot Service. For more information, see Accessing Versions Stored by Windows System Protection or the Araxis Snapshot Service.
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 square adornment.
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 and Colours options page to change the colours that are used for inserted, removed, changed and unchanged files and folders.
Use the ribbon Options ▸ Show timestamps and sizes menu command to turn the display of file timestamps and sizes on and off.
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 Show changes column command in the ribbon Options 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
You can select files and folders in the results list in the following ways:
- Use the commands in the ribbon Select rows menu to select rows in a variety of different ways.
- Click on an item to select it and deselect any other selected items.
- Hold down Ctrl 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 Ctrl+A to select all the files in the results list.
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.
Showing a file comparison for the currently selected folder comparison row
Use the Two-way with file comparison or Three-way with file comparison ribbon buttons to split the display horizontally, with a file comparison shown beneath the folder comparison. Click on a row in the folder comparison to compare that row’s files in the file comparison below.
Use the Two-way (vertical) or Three-way (vertical) ribbon buttons to turn off the file comparison display.
Deleting files and folders
To delete files in the folder comparison window, select the files and folders that you wish to remove and press the Delete key. Alternatively, use the Delete selected ribbon command.
You can usually undo a deletion by restoring the deleted files and folders from the Windows recycle bin.
Hiding files and folders
You can hide files and folders in the results list by selecting them and then using the commands in the ribbon Hide/reveal menu.
You can later show all hidden items using the Show hidden items command on the same menu.
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 command.
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 command. 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 files, you may want to set bookmarks to enable you to return to locations of interest later on. Press Ctrl+F2, or click Toggle bookmark in the ribbon, to toggle a bookmark on or off on the current line. To navigate between bookmarks, press F2 or Shift+F2, or use the Next bookmark and Previous bookmark buttons in the ribbon.
Comments can be added to bookmarks, making it easy to note important information or to record a question. To edit a bookmark’s comment, 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 create an HTML comparison report or save a comparison for archival or team collaboration. 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 The Options Dialog topic.