Replacing

Suppose after further reflection we realize that the version of file1.txt that we just received is incorrect and in fact we want an earlier version. You can replace a workbench resource with a versioned resource of the same name from the repository. To rollback to an earlier version we can  proceed as follows:

1.

In the Navigator view select the file1.txt

2.

From the file's context menu, select Replace With > Version...

3.

In the Replace With Version in Repository dialog, choose the original (bottom-most) version and click the Replace button.

4. Choose Show Version Info from the Navigator view pull-down menu

Observe that the Navigator indicates that our project JanesTeamProject is associated with the HEAD stream (see #1). In addition the ">" (see #2) indicator lets us know that we have changed file1.txt (by replacing it with the earlier version). 

5. Now that we have finished our coffee we realize that this older version is not as good as it initially seemed and in fact the version in the stream is better after all. 

Instead of choosing Team > Synchronize with Stream to catch up to the stream let's choose Replace With > Stream Contents. 

Observe that file1.txt is updated to be the contents from the stream, and that the leading indicator ">" has been removed since we now have the same version as the stream.

We have seen how to synchronize with the stream, replace with versions from the stream or the repository. You can also compare with these versions in a similar manner by choosing the  Compare With menu operation from a resource's context menu in the Navigator.