Comparing and merging are both based on the detection of differences. This topic describes differences and conflicts.
The basic unit of detection is an XML node: a difference always compares a node in a single contributor to the same node type in the base version.
A node can include multiple child nodes, but the granularity of detection goes no lower. For example, if the contents of a text node has changed, Rational® ClearCase® XML Diff Merge does not indicate what differences exist in the text; it simply indicates that the node is different in two versions.
To find the same node in different contributors, Rational ClearCase XML Diff Merge performs the following sequence of matching tests:
Table 1 describes the four types of differences that Rational ClearCase XML Diff Merge detects, and how each appears in the contributor panes. For simplicity, only one base version/contributor pair is shown. Notice the text color and hover help of each difference: these clearly indicate the type of difference.
Difference type | Illustration |
---|---|
Change The value of the item is different. |
![]() |
Add An item is inserted in a contributor. The base version includes a placeholder where the item is inserted in the changed contributor. |
![]() |
Delete An item is removed in a contributor. The changed contributor includes a placeholder where the item has been removed. |
![]() |
Move The location of the item is different. The move difference has multiple locations in each contributor: the XML item itself, and a placeholder node at each location of the XML item in the other contributors. Use the |
![]() |
After matching nodes, an automatic merge attempts to resolve differences:
In both the Merging and Comparing windows, you navigate unresolved difference nodes by clicking the Unresolved Difference buttons. Unresolved differences have slightly different meanings in each window.
In the Merging window, each unresolved difference in the contributor panes is represented by a merge point icon in the merge output pane.
In the Comparing window, unresolved differences represent conflict that would remain after an automerge, no matter what the automerge policy.
Conflicts can be described in terms of the individual difference types among the contributors. In both windows, the hover help for an unresolved differences indicates one of the types of conflicts described in Table 2.
Unresolved difference type | Illustration |
---|---|
Change-change The same node is changed differently in two or more contributors. |
![]() |
Add-add Different versions of the same node have been inserted in two or more contributors. |
![]() |
Change-delete The same node is changed in one contributor and deleted in another. |
![]() |
Move-change The same node is changed in one contributor and moved to a different location in another. |
![]() |
Move-delete The same node is deleted in one contributor, and moved to a different location in another. |
![]() |
Move-move The same node is moved to one location in one contributor, and to a different location in another. |
![]() |