Merging operates on differences between files. When Merging discovers a line that differs between the two files to be merged (or between either of the two files and an ancestor), it marks the lines in the two files with glyphs corresponding to how the lines differ. Together, these marked lines are called a difference. As you move through the files from one difference to the next, the lines that differ and their glyphs are highlighted.
The highlighted difference is called the current difference. The differences immediately before and immediately after are called the previous difference and the next difference.
A difference is resolved if the changes to a line are accepted. A remaining difference is one that has not yet been resolved.
If the Auto Merge option is selected, Merging resolves differences automatically.
Glyphs help you understand the differences between files. There are three types of glyphs:
Glyph Type |
Meaning |
---|---|
Plus sign (+) |
New line |
Minus sign (-) |
Deleted line |
Vertical bar (|) |
Change in line |
No glyph |
No changes in line |
When you designate a common ancestor file, glyphs next to the lines in each file indicate when the lines differ from the corresponding lines in the ancestor:
If a line is identical in all three files, there is no glyph.
If a line was added to one or both of the descendants, then a plus sign (+) shows where the line was added, and the line is highlighted.
If a line is present in the ancestor but was removed from one or both of the descendants, then a minus sign (-) shows where the line was removed, and the line is highlighted and in strikethrough font.
If a line is in the ancestor but has been edited in one or both of the descendants, then a vertical bar (|) shows where the line was changed, and the characters that differ are highlighted.
When a difference is resolved, the glyph changes to an outline font.
You can move between differences using the buttons above the two panes or the Navigate menu. Use the Previous and Next buttons to scroll through the differences without accepting them. Choose Navigate > Find to navigate to a particular text string. Choose Navigate > Goto Line to navigate by line numbers.
You can also navigate between differences by using the popup menu that is available in the Child and Parent panes. Click the right mouse button in either pane to open the menu.
To resolve a difference, accept the change in either the left or right pane:
To accept the difference and move to the next difference, click the Accept & Next button.
When Merging is invoked by a Resolve transaction in the Configuring window of Sun WorkShop TeamWare, the Reload button is added to the Merging window. Clicking the Reload button at any point during resolution reloads the files, abandons all the conflicts that have been resolved, and starts over. The files are reloaded from disk, and any nonconflicting differences are resolved if the Auto Merge option is selected. You can then proceed by accepting one or the other version of the remaining lines that conflict.
Choose Options > Diff Options to customize Merging to ignore certain kinds of differences between files. You can set Merging to ignore trailing or embedded white space and to ignore differences in case.