Using Sun WorkShop

Working With Differences

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.

Current, Next, and Previous Differences

The highlighted difference is called the current difference. The differences immediately before and immediately after are called the previous difference and the next difference.

Resolved and Remaining Differences

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.

Understanding Glyphs

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:

When a difference is resolved, the glyph changes to an outline font.

Moving Between Differences

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.

Resolving Differences

To resolve a difference, accept the change in either the left or right pane:

  1. To accept a difference, click the Accept button.

  1. To accept the difference and move to the next difference, click the Accept & Next button.


    Note -

    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.


Setting Difference Options

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.