| <!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>Reverting a branch to a previous version</title> |
| </HEAD> |
| |
| <BODY BGCOLOR="#ffffff"> |
| <H1>Reverting a branch to a previous version</H1> |
| <p> |
| It is often useful to revert the contents of a branch to those of a specific version. For example, if your current branch contains changes that you no longer want to release you can revert all or a portion of a project to the contents of any version.</p> |
| |
| <ol> |
| <li>Checkout into your workspace the contents from the branch that you want |
| to revert. </li> |
| <li>Select <strong>Compare With > Another Branch or Version</strong> on the |
| resource(s) that you want to revert. </li> |
| <li>From the tag selection dialog box select the version to which you want to |
| revert the branch.</li> |
| <li>When the compare editor opens, review the differences that are shown and |
| ensure that they are what you expected. </li> |
| <br> |
| <br> |
| <i>Tip</i>: If several files report as false differences (e.g. the files are |
| shown but there are no actual changes in the files) select the <img src="../images/team_contents_icon.gif" alt="" border="0" width="16" height="16"> |
| <strong>Use File Contents</strong> toolbar button to recomputed the comparison |
| using file contents instead of revision numbers.<br> |
| <br> |
| <li>Select the root folder in the compare view and from the context menu select |
| <strong>Copy All Changes From Right To Left</strong>. After the operation |
| is completed the folder or project you compared against will have exactly |
| the same contents as the remote revision. </li> |
| <li>You can verify this by performing another comparison against the version. |
| However this time, when the comparison completes select the <img src="../images/team_contents_icon.gif" alt="" border="0" width="16" height="16"> |
| <strong>Use File Contents</strong> toolbar button to redo the comparison using |
| file contents instead of revision numbers. <i>Note</i>: you may also have |
| to select the <strong>Ignore White Space</strong> button too. </li> |
| <li>After the comparison using file contents completes the compare editor should |
| be empty. Meaning that the files in your workspace are identical to the ones |
| in the selected version.</li> |
| </ol> |
| <p CLASS="Head">Once your workspace contains the new contents, run your tests |
| then commit the changes to the branch.</p> |
| |
| <p><img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"><br> |
| <a href="../concepts/concepts-26.htm">Team programming with CVS</a> |
| </p> |
| |
| <p><img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"><br> |
| <a href="tasks-115.htm">Synchronizing with the repository</a><br> |
| <a href="tasks-114.htm">Committing</a> |
| </p> |
| |
| <p> <br> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright IBM Corporation and others 2000, 2003" border="0" width="324" height="14"></a> |
| </p> |
| |
| </BODY> |
| </HTML> |