![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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.
- Filename
A file pathname must be specified (in the File #1 or File #2 field) and a version indicator or number may be specified in the Version field. The version is selected from the current history of the file.
- Element
The fields Subsystem, Element, History, and Version must be specified. (See Version and Element Names.)
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.
- Place Result into Field
Places the result in the specified file. By default, the file has the same name as File #1 with the suffix ".merged" appended.
- Place Result into File #1
Places the result back into File #1. The following additional options apply.
Options Tab
This tab contains various options controlling the merging process:
Ancestor Tab
The are three choices for specifying the common ancestor version
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.
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:
- Insertions and deletions that are specific to one or the other of the 2 input files, but not both. These are shown in the following way:
1++|... 2--|...
- Conflicts are changes that occur in both files at the same location. Files in conflict are bracketed by the [:::] CONFLICT and [:::] END CONFLICT separators.
l:::| CONFLICT 1++|#include "editor_interface/operation_names.h" :::|---------------- 2++|#include "editor_interface/dialog_names.h" :::| END CONFLICT
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.
- Change ->
Change <-Move to the next or previous region, either an insertion, deletion or conflict.
- Apply Current
Apply All 1
Apply All 2The Apply commands are applicable to insertions and deletions. The Apply Current command does the insertion or deletion, indicated by the cursor location, into the merged file. Apply All 1 does all insertions and deletions from file 1. Apply All 2 does all insertionsand deletions from file 2.
- Delete Current
Delete All 1
Delete all 2The Delete commands are applicable to deletions. The Delete Current command deletes the change at the cursor location from the merged file. Delete All 1 deletes all entries from file 1. Delete All 2 deletes all entries from file 2.
- Conflict ->
Conflict <-Move to the next or previous conflict. When the conflict occurs, the change regions from the 2 files are listed.
- Accept 1
Accept 2
Accept Both
Accept All 1
Accept All 2Accept 1 takes the region of lines from file 1, puts it into the merged file and deletes all the other lines in the conflict section. Accept 2 takes the region of lines from file 2 puts it into the merged file and deletes all the other lines in the conflict section. Accept Both takes both regions. Accept All 1 takes all regions from file 1, puts them in the merged file and deletes all the other lines in the conflict sections. Accept All 2 takes all regions from file 2, puts them in the merged file and deletes all the other lines in the conflict sections.
- Copy Onto File 1
Copies the merged file to file 1, replacing its contents (the Apex copy command)
- Move Onto File 1
Copies the merged file to file 1, replacing its contents and deleting the merged file (the Apex move command)
- Show Highlights
Puts the color highlights back in the display if they were removed.
Command Line Interface: merge
Additional Topics
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |