Determining who last modified a line with the Annotate command
Let's say you have found some code that you don't understand on line 65 of a file.
Who do you ask about it? Well you could start by
looking at the resource history for the file, but that won't tell you who changed
that particular line. This is why the Annotate command is useful.
Sometimes jokingly referred to as the blame,
it allows you to pick any
ASCII file (see note on binary files) and get a listing of who changed what
The Team > Show Annotation action
is available from the following places: History View, Repository Explorer,
Synchronize View, the Project and Package Explorers, and text editor context menus. The action works in a Quick Diff
flavor and offers the following features:
- Displays the annotations on a local file right in the same editor.
- Clicking on an annotation or clicking on any line in the editor will prompt the
History View to show the corresponding revision information.
- Doesn't lose your place in the editor when displaying the annotation; simply adds the
annotations to the annotation bar of the editor that you are currently using.
- To turn off annotations, you have to select Revisions > Hide Revision Information from the annotation
bar context menu.
Only works with text files
The annotate command will only work with files that are marked as ASCII in
the CVS repository. Also, the command will open a text file to show the changes
even if the associated editor in the workbench is a non-text editor. For example,
if you run annotate on a plugin.xml file a simple text editor will be opened
instead of the full PDE editor.
Team programming with CVS