Sun WorkShop TeamWare 2.1 User's Guide

Merging Window

The graphical interface for Merging consists of the Merging window, in which you do most of your work.

Merging Window at Startup

Figure 4-1 shows the Merging window with the left and right text panes at the top displaying the files to be compared; the text pane at the bottom displays a merged version of the two files that you can edit.

Figure 4-1 Merging Window at Startup

Graphic

File menu 

Provides commands for opening and saving files 

Edit menu 

Provides commands for managing differences between files 

Navigate menu 

Provides commands for moving among differences in both files 

Option menu 

Provides commands for setting merging, scrolling, display, and diffing options 

TeamWare menu 

Provides command for starting other TeamWare tools 

Tool bar 

Provides quick access to file management operations 

Status field 

Displays information about the state of your merge 

Child pane 

Shows the child file with markings 

Command buttons 

Provide quick access to navigating and editing functions 

Parent pane 

Shows the parent file with markings 

Merged Result pane 

Shows you the combined file with markings 

Merging message area 

Displays messages about operating in the Merging window 

Merging Glyphs

When files are loaded in the text panes, glyphs appear to indicate the disparities. There is a difference between two files being merged without a common ancestor, and two files that have a common ancestor (this case is actually a three-way merge). The meaning of the glyphs in each case is slightly different, as explained below.

Two Input Files

When only two files have been loaded into Merging, lines in each file are marked by glyphs to indicate when they differ from corresponding lines in the other file:

Three Input Files

When an ancestor file has been specified for the two files to be merge, lines in each descendant are marked according to their relationship to the corresponding lines in the common ancestor:

Resolved differences are marked by glyphs in outline font.

Table 4-1 summarizes the automerging algorithm. Ancestor is the version of a text line that is in the ancestor file; Change 1 is a change to that line in one of the descendants; Change 2 is another change, different from Change 1. Only when a line is changed differently in the left and right descendants does automerging fail.

Table 4-1 Automerging Rules Summary

Left Descendant 

Right Descendant 

Automerged Line 

Ancestor 

Ancestor 

Ancestor 

Change 1 

Ancestor 

Change 1 

Ancestor 

Change 2 

Change 2 

Change 1 

Change 1 

Change 1 

Change 1 

Change 2 

No Automerge 

When Merging automatically resolves a difference, it changes the glyphs to outline font. Merging lets you examine automatically resolved differences to be sure that it has made the correct choices.

You can disable automatic merging by deselecting Auto Merge on the Options menu. When automatic merging is disabled, Merging constructs a merged file using only lines that are identical in all three files and relies on you to resolve the differences.

If you do not specify an ancestor file, Merging has no reference with which to compare a difference between the two input files. Consequently, Merging cannot determine which line in a difference is likely to represent the desired change. The result of an automerge with no ancestor is the same as disabling automatic merging: Merging constructs a merged file using only lines that are identical in both input files and relies on you to resolve differences.