Displaying Recent Changes
The cvs
annotate
command
displays the most recent change for each line of a file in the
repository. This 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
bash-2.05a$ cvs annotate src/wizzard.h
Annotations for src/wizzard.h
***************
1.6 (doppel 15-Sep-02): #include "config.h" /* using autoconf */
1.6 (doppel 15-Sep-02): #include "options.h" /* manual options that can't
1.1 (jenn 11-Sep-02):
1.2 (jenn 13-Sep-02): #define TRUE 1
1.2 (jenn 13-Sep-02): #define FALSE 0
cvs annotate
has the following syntax:
cvs [cvs-options
] annotate [command-options
] [filenames
]
If you don’t give a filename, cvs
annotate
attempts to run annotate
on
all the files in the current sandbox. The filenames can be
directories or modules.
Tip
annotate
doesn’t work correctly
on binary files. CVS tries to display them as text files, which can
trigger the bell character and mess with your terminal window.
Use the -F
option to run cvs
annotate
on binary files. You can select which revision ...
Get Essential CVS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.