Java Reference
In-Depth Information
Figure 8.16 Change bars are another way of recognizing what lines of a file
have been altered.
Viewing an older revision of the file
If you want to examine an older revision of a file, double-click its entry in the His-
tory view. Doing so fetches the older version of the file into the editor. The name
of the file also includes the version number, to prevent confusion; and the file is
locked so you can't accidentally edit an older revision, believing it to be current.
Reverting a file to a previous version
You can use the version history list to revert a file back to a previous version. To
do so, select the version you'd like to restore, and then click the Get icon in the
history toolbar. The older version of the file is loaded into the editor, replacing
the current contents of the file. If the file has modifications that haven't been
committed yet, you're warned that those changes will be lost as the file is overwrit-
ten. When you commit the file back to the repository, it's assigned the next ver-
sion number.
It's important to understand that you can't really go back to a previous version
per se; rather, you can replace the current contents of the file with a copy of an
older version of the file. You must re-commit the file to bring the repository up to
date. Your newly committed file gets a new version number, but the contents of
the file are identical to the earlier version you copied the content from. It's usu-
ally a good idea to note this in your commit message with an explanation of the
rollback—something like “Reverted back to version 1.33 because the changes
were causing serious performance issues.”
If you want to throw out your local modifications, you can use the CVS |
Rollback Local Changes command. It discards any edits since the most
recent Update or Commit command.
TIP
 
 
 
 
Search WWH ::




Custom Search