blob: 62533f0575196c9bc46a988badbd2443a0166f94 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<HEAD>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2011. 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>Reverting a branch to a previous version</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</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 &gt; 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>
<li>Select the root folder in the compare view and from the context menu select
<strong>Override and Update</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.
(<strong>Note</strong>: That the CVS preference to <strong>Consider file contents
in remote comparisons</strong> in the
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.team.cvs.ui.ComparePreferences)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link">
<b>Team &gt; CVS &gt; Synchronize/Compare</b></a>
preference page should be enabled for this to work.) </li>
<li>The comparison should report that there are no changes.</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.png" alt="Related concepts" ><br>
<a href="../concepts/concepts-26.htm">Team programming with CVS</a>
</p>
<p><img border="0" src="../images/ngrelt.png" alt="Related tasks" ><br>
<a href="tasks-115.htm">Synchronizing with the repository</a><br>
<a href="tasks-114.htm">Committing</a>
</p>
</BODY>
</HTML>