| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| |
| <meta http-equiv="Content-Type" |
| content="text/html; charset=ISO-8859-1"> |
| |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| |
| <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" |
| type="text/css"> |
| <title>Three way comparisons</title> |
| |
| </head> |
| <body style="background-color: rgb(255,255,255);"> |
| |
| <h1 class="Head"> Three way comparisons </h1> |
| |
| <p class="Para"> Three way comparisons show the differences between three different |
| versions of a resource. This feature is most useful when merging resources |
| or when there is a conflict during synchronization. Conflicts occur when |
| two developers add a version from the same branch to their Workbench, then each |
| developer modifies it, then one developer attempts to commit the resource after |
| the other developer has already committed it. </p> |
| |
| <p class="Para"> When this situation arises, you can view the differences between |
| three resource versions: the resource in the Workbench, the version of the resource |
| that is committed in the branch, and the <i> common ancestor</i> from which the |
| two conflicting versions are based. If a common ancestor cannot |
| be determined, for example because a resource with the same name and path was |
| created and committed by two different developers, the comparison becomes a |
| two-way comparison. </p> |
| <h2>Interpreting compare results</h2> |
| <p>The Synchronize view allows you to view the differences between two or three |
| files. If a common ancestor is available, the sync view performs a three way |
| comparison. It is possible that a common ancestor for two conflicting resource |
| versions cannot be determined, (e.g. a resource with the same name and path |
| is created and committed by two different developers). In this case the compare |
| becomes a regular two way compare. </p> |
| <p class="Para">In a three way compare the Workbench shows you: </p> |
| <ul class="UnorderedList"> |
| <li class="Item"> what has been changed in the first child in comparison to |
| the common ancestor. </li> |
| <li class="Item"> what has been changed in the second child in comparison to |
| the common ancestor.</li> |
| </ul> |
| |
| <p class="Para"> In the picture below, the common ancestor is displayed in the top pane of the text |
| compare pane. The differences that you see |
| highlighted are what has changed in the Workbench resource as compared to the |
| common ancestor, and what has been changed in the branch resource as compared |
| to the common ancestor. The sections that differ in all three files are highlighted |
| as differences. Conflicts are shown in red, incoming changes in blue, and |
| outgoing changes in gray. </p> |
| |
| <p class="Para"> <img src="../images/Image49_3_way_compare.png" alt="Synchronize View with 3 way compare" border="0" > |
| </p> |
| |
| <p><img border="0" src="../images/ngrelc.png" alt="Related concepts"><br> |
| <a href="../concepts/concepts-30.htm">Synchronizing with a CVS repository</a></p> |
| |
| <p><img border="0" src="../images/ngrelt.png" alt="Related tasks"><br> |
| <a href="../tasks/tasks-92.htm">Creating a CVS repository location</a><br> |
| <a href="../tasks/tasks-68.htm">Comparing resources</a> <br> |
| <a href="../tasks/tasks-115.htm">Synchronizing with a repository</a><br> |
| <a href="../tasks/tasks-68dg.htm">Merging changes in the compare editor</a><br> |
| <a href="../tasks/tasks-113.htm">Updating</a><br> |
| <a href="../tasks/tasks-113b.htm"> Resolving conflicts</a><br> |
| <a href="../tasks/tasks-68b.htm">Setting preferences for comparing files</a><br> |
| <a href="../tasks/tasks-101.htm">Comparing resources with repository versions</a></p> |
| |
| <p><img border="0" src="../images/ngrelr.png" alt="Related references" ><br> |
| <a href="../reference/ref-25.htm">Compare editor</a><br> |
| <a href="../reference/ref-33.htm">CVS Synchronize view</a> |
| </p> |
| |
| </body> |
| </html> |