TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Control > Merge (Apex/Summit)

This command combines the contents of two files into a result file. The merge may be based on a specified common ancestor version of the files.

When the Summit merge tool is used, the result file may contain annotations. The annotations indicate conflicting changes with respect to the common ancestor and other changes that are to be processed manually. The result may be viewed in a merge editor window to resolve and remove the annotations. The Summit merge tool may be applied to any pair of text files.

Merge Dialog Box Fields

Filename/Element Fields

These fields specify objects to be merged (which are called "contributors" to the merge). Each object may be identified using a filename or element name by selecting the appropriate radio button.

For an uncontrolled object, the Filename option must be used. The Version field is ignored in this case.

Exchange #1 and #2 Button

This button exchanges the two objects to be merged. This affects the annotations in the result file and format of merge editor window.

Result Tab

This tab specifies the result file to be produced.

Options Tab

This tab contains various options controlling the merging process:

Visit Result
Visit the result file in a merge editor window to resolve annotations. This is selected by default. The Summit merge editor window is described below.
Consider whitespace
Consider lines to be the same only if they match exactly. By default, lines that are the match except for leading or trailing spaces and tabs are considered to be the same.
Apply changes from object #1
Non-conflicting changes from File #1 are included in the result without annotation.
Apply changes from object #2
Non-conflicting changes from File #2 are included in the result without annotation.

Ancestor Tab

The are three choices for specifying the common ancestor version

Compute Common Ancestor Automatically
Use the version tree of the element to find a common ancestor version for all of the contributor versions. This option may also be set when there is no common ancestor.
Filename
The specified File and Version fields identify the common ancestor (in the current history of the file).
Element
The specified Subsystem, Element, History, and Version fields identify the common ancestor.

Visit Tab

The buttons on this tab visit a merge result file in the Summit merge editor window to resolve merge annotations. These buttons may be used to visit the result file after a merge has been performed by pressing Apply or to visit the result file of a previous merge operation. The merge editor window operates on the result file using the annotations stored in that file.

Press here to Visit File #1 in the Merge Editor
Visit the file specified as File #1 in a merge editor window.
Press here to Visit Result File in the Merge Editor
Visit the currently designated result file in a merge editor window. (See the Result Tab above.)

Merge Editor Windows

When the Summit merge tool is used, the result file will contain annotations identifying any changes that were not applied because one of the Apply Changes from object... options was not selected or because the changes conflict.

If the Visit Result option is set on the Options tab, the result file will be visited in a merge editor window to resolve the changes. The buttons on the Visit tab may also be used to view a result file in the merge editor window.

A conflict occurs when a common ancestor is specified and the files to be merged have different changes for the same region. An example of a conflict, displayed in a merge editor window, is shown below:

In the merged file, there are two kinds of sets of highlighted regions:

The following operations are available from the Merge menu on this window. Many are also available from the button bar. Note that Edit mode must be selected for some of the commands/buttons to become active. The Apply/Delete commands are applicable to insertions and deletions, while the Accept commands are applicable to conflicts.

Command Line Interface: merge

Additional Topics

For more information, click on a topic:


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS