While reading the directories a message-box appears that informs you of the progress. If you abort the directory scan, then only files that have been compared until then will be listed.
When the directory scan is complete then KDiff3 will show a listbox with the results left, ...
... and details about the currently selected item on the right:
Each file and directory that was found during the scan is shown here in a tree. You can select an item by clicking it with the mouse once.
The directories are collapsed by default. You can expand and collapse them by clicking on the "+"/"-" or by double-clicking the item or by using the left/right-arrow-keys. The "Directory"-menu also contains two actions "Fold all subdirs" and "Unfold all subdirs" with which you can collapse or expand all directories at once.
If you double-click a file item then the file comparison starts and the file-diff-window will appear.
The image in the name column reflects the file type in the first directory ("A"). It can be one of these:
Normal file
Normal directory (directory-image)
Link to a file (file-image with a link arrow)
Link to a directory (directory-image with a link arrow)
If the file type is different in the other directories, then this is visible in the columns A/B/C and in the window that shows the details about the selected item. Note that for such a case no merge operation can be selected automatically. When starting the merge, then the user will be informed of problems of that kind.
As can be seen in the image above the colors red, green, yellow and black are used in the columns A/B/C.
Black: This item doesn't exist in this directory.
Green: Newest item.
Yellow: Older than green, newer than red.
Red: Oldest item.
But for items that were identical in the comparison their color also is identical even if the age is not.
Directories are considered equal if all items they contain are identical. Then they also will have the same color. But the age of a directory is not considered for its color.
The idea for this coloring scheme I came upon in dirdiff. The colors resemble the colors of a leaf that is green when new, turns yellow later and red when old.
After comparing the directories KDiff3 also evaluates a proposal for a merge operation. This is shown in the "Operation" column. You can modify the operation by clicking on the operation you want to change. A small menu will popup and allows you to select an operation for that item. (You can also select the most needed operations via keyboard. Ctrl+1/2/3/4/Del will select A/B/C/Merge/Delete respectively if available.) This operation will be executed during the merge. It depends on the item and on the merge-mode you are in, what operations are available. The merge-mode is one of
Three directory-merge ("A" is treated as older base of both).
Two directory-merge.
Two directory-sync-mode (activate via option "Synchronize Directories").
In three directory merge the operation proposal will be: If for an item ...
... all three directories are equal: Copy from C
... A and C are equal but B is not: Copy from B (or if B does not exist, delete the destination if exists)
... A and B are equal but C is not: Copy from C (or if C does not exist, delete the destination if exists)
... B and C are equal but A is not: Copy from C (or if C does not exist, delete the destination if exists)
... only A exists: Delete the destination (if exists)
... only B exists: Copy from B
... only C exists: Copy from C
... A, B and C are not equal: Merge
... A, B and C don't have the same file type (e.g. A is a directory, B is a file): "Error: Conflicting File Types". While such items exist the directory merge cannot start.
In two directory merge the operation proposal will be: If for an item ...
... both directories are equal: Copy from B
... A exists, but not B: Copy from A
... B exists, but not A: Copy from B
... A and B exist but are not equal: Merge
... A and B don't have the same file type (e.g. A is a directory, B is a file): "Error: Conflicting File Types". While such items exist the directory merge cannot start.
Sync-mode is active if only two directories and no explicit destination were specified and if the option "Synchronize directories" is active. KDiff3 then selects a default operation so that both directories are the same afterwards. If for an item ...
... both directories are equal: Nothing will be done.
... A exists, but not B: Copy A to B
... B exists, but not A: Copy B to A
... A and B exist, but are not equal: Merge and store the result in both directories. (For the user the visible save-filename is B, but then KDiff3 copies B also to A.)
... A and B don't have the same file type (e.g. A is a directory, B is a file): "Error: Conflicting File Types". While such items exist the directory merge cannot start.
When two directories are merged and the option "Copy newer instead of merging" is selected, then KDiff3 looks at the dates and proposes to choose the newer file. If the files are not equal but have equal dates, then the operation will contain "Error: Dates are equal but files are not." While such items exist the directory merge cannot start.
During the merge one file after the other will be processed. The status column will show "Done" for items where the merge operation has succeeded, and other texts if something unexpected happened. When a merge is complete, then you should make a last check to see if the status for all items is agreeable.
When the file comparison mode "Full Analysis" is enabled in the options, then KDiff3 will show extra columns containing the numbers of unsolved, solved, nonwhite and whitespace conflicts. (The solved-column will only show when comparing or merging three directories.)
Several options influence which files are listed here. Some are accessible in the settings dialog. The Directory-menu contains the entries:
"Show Identical Files": Files that have been detected equal in all input directories.
"Show Different Files": Files that exist in two or more directories but are not equal.
"Show Files only in A": Files that exist only in A, but not in B or C.
"Show Files only in B": Files that exist only in B, but not in A or B.
"Show Files only in C": Files that exist only in C, but not in A or B.
Activate only the "Show"-options for the items you want listed. If for example you only want to list all items that exist either in A or in B but not in both, you'll have to activate "Show Files only in A" and "Show Files only in B" and deactivate all others ("Show Identical Files", "Show Different Files", "Show Files only in C"). The list will be updated immediately to reflect the change.
These options also apply for directories with one exception: Disabling "Show Different Files" will not hide any complete directories. This will work only for files within.
Note that of these only the "Show Identical Files"-option is persistant. The others are enabled when starting KDiff3.
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team