Reverting a branch to a previous version

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.

  1. Checkout into your workspace the contents from the branch that you want to revert.
  2. Select Compare With > Another Branch or Version on the resource(s) that you want to revert.
  3. From the tag selection dialog box select the version to which you want to revert the branch.
  4. When the compare editor opens, review the differences that are shown and ensure that they are what you expected.
  5. Select the root folder in the compare view and from the context menu select Override and Update. After the operation is completed the folder or project you compared against will have exactly the same contents as the remote revision.
  6. You can verify this by performing another comparison against the version. (Note: That the CVS preference to Consider file contents in remote comparisons in the command link Team > CVS > Synchronize/Compare preference page should be enabled for this to work.)
  7. The comparison should report that there are no changes.

Once your workspace contains the new contents, run your tests then commit the changes to the branch.

Related concepts
Team programming with CVS

Related tasks
Synchronizing with the repository
Committing