Keywords and Keyword Modes
CVS contains keywords that can be included in nonbinary project files. When CVS finds a keyword in a file it is checking out, it expands the keyword to provide metadata about the latest revision of the file. You can set keyword-expansion modes on a file to tell CVS whether (and how) to expand the keywords it finds.
Keyword-expansion modes also control line-ending conversion.
Unix, Macintosh, and Windows operating systems use different sets of
codes to signal the ends of lines. (GNU/Linux uses the same codes as
Unix.) When you commit a file from an operating system that doesn’t
use Unix line endings, CVS converts the line endings to Unix style. If
you are storing binary files, this conversion can corrupt the file.
Use the -kb
keyword-expansion mode to tell CVS not to
convert line endings.
CVS keywords take the form:
$Keyword
$
All keywords except Log
expand to the format:
$Keyword
:value
$
These are the keywords and the information they show about the file they are in:
-
Author
The username of the user who committed the last revision.
-
Date
The date on which the last revision was committed, in UTC.
-
Header
A header containing information about the file, including the author, date and revision number, path and filename of the RCS file (project file in the repository), file status, and whether the file is locked.
-
Id
A header like the one given by the
Header
keyword, without the path of the RCS file.-
Locker
The username of the user who locked the file with
cvs admin ...
Get Unix in a Nutshell, 4th Edition 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.