5.5. Displaying Recent ChangesThe cvs annotate command displays the most recent change for each line of a file in the repository. This command is very helpful when you need to know which change broke the compilation or who rewrote a key paragraph in the documentation incorrectly. This command works off the repository copy, not the sandbox copy, so it does not show any changes in the sandbox that were not committed. For each line, cvs annotate shows the revision number for the last change, the user, the date, and the contents of the line. This is a quick way of discovering who made which change. Example 5-17 shows some of the annotations for the wizzard.h file. Example 5-17. Using cvs annotate
cvs annotate has the following syntax: cvs [cvs-options] annotate [command-options] [filenames] If you don't provide a filename, cvs annotate attempts to run annotate on all the files in the current sandbox. The filenames can be directories or modules.
Use the -F option to run cvs annotate on binary files. You can select which revision to display with -D date and -r revision (or tag), and you can use the -f option to force CVS to use the most recent revision on the trunk if no revision matches the specified date, revision, or tag. cvs annotate uses the usual -l and -R options to control local and recursive operation, respectively. Graphic clients also use pretty colors for annotate. Figure 5-4 shows the annotate display in TkCVS. Figure 5-4. Graphic display of annotate |