| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> |
| <HEAD> |
| <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>Replacing</title> |
| |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <h3> |
| Replacing</h3> |
| <p CLASS="Head"> Suppose after further reflection we realize that the revision |
| of file1.txt that we just received is incorrect and in fact we want an earlier |
| revision. You can replace a Workbench resource with an earlier revision of the |
| resource from the repository. To roll back to an earlier revision:</p> |
| <ol> |
| <li> |
| <p CLASS="Head"> In the Navigator view select the file1.txt</p> |
| </li> |
| <li> |
| <P CLASS="Para"> From the file's context menu, select <b>Replace With > |
| Revision</b></P> |
| </li> |
| <li> |
| <P CLASS="Para"> In the replace with revision Compare editor that opens, |
| choose the original (bottom) revision and, from the pop-up menu choose |
| <b>Get Contents</b>.</P> |
| </li> |
| <li>Open the preferences (<b>Window > Preferences</b>) and turn on the CVS label |
| decorations (on page <b>Workbench > Label Decorations</b> and ensure <b>CVS</b> is checked). |
| <p><img src="../images/Image84_decorator_preference.gif" alt="Decorator Preference" border="0" width="531" height="440"></p> |
| <p>Observe that the Navigator updates to show the CVS state of a resource. |
| Notice that the modified file is preceded by "> (see #1) indicating |
| that we have changed file1.txt (by replacing it with the earlier version). </p> |
| <p><img src="../images/Image84_replace2.gif" alt="File selection" border="0" width="227" height="151"></li> |
| <li>Now that we have finished our coffee we realize |
| that this older revision is not as good as it initially seemed and in fact |
| the revision in the repository is better after all. <p>Instead of choosing <b>Team > Synchronize with Repository</b>, let's choose |
| <b>Replace With > Latest from Repository.</b></p> <p>Observe that file1.txt is updated to be the contents from the repository, |
| and that the leading indicator ">" has been removed since |
| we now have the same revision as the repository. |
| </li> |
| </ol> |
| <P>We have seen how to synchronize with the repository, replace with revision |
| or replace with the latest from the repository. You can also compare with these |
| revisions/versions in a similar manner by choosing the <b>Compare With</b> menu |
| operation from a resource's context menu in the Navigator. </P> |
| |
| |
| <P> <br> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright IBM Corporation 2000, 2003. All Rights Reserved." border="0" width="324" height="14" ></a> |
| </P> |
| |
| |
| </BODY> |
| </HTML> |