Next: Using keywords, Up: Keyword substitution
This is a list of the keywords:
$Author$$CVSHeader$Note that this keyword has only been recently
introduced to cvs and may cause problems with
existing installations if $CVSHeader$ is already
in the files for a different purpose. This keyword may
be excluded using the KeywordExpand=eCVSHeader
in the CVSROOT/config file.
See Configuring keyword expansion for more details.
$Date$$Header$$Id$$Header$, except that the rcs
filename is without a path.
$Name$cvs
co -r first, the keyword expands to `Name: first'.
$Locker$cvs admin -l is in use).
$Log$$Log:...$.
By default, each new line is prefixed with the same string which
precedes the $Log$ keyword, unless it exceeds the
MaxCommentLeaderLength set in CVSROOT/config.
For example, if the file contains:
/* Here is what people have been up to:
*
* $Log: frob.c,v $
* Revision 1.1 1997/01/03 14:23:51 joe
* Add the superfrobnicate option
*
*/
then additional lines which are added when expanding
the $Log$ keyword will be preceded by ` * '.
Unlike previous versions of cvs and rcs, the
comment leader from the rcs file is not used.
The $Log$ keyword is useful for
accumulating a complete change log in a source file,
but for several reasons it can be problematic.
If the prefix of the $Log$ keyword turns out to be
longer than MaxCommentLeaderLength, CVS will skip expansion of this
keyword unless UseArchiveCommentLeader is also set in
CVSROOT/config and a `comment leader' is set in the RCS archive
file, in which case the comment leader will be used instead. For more on
setting the comment leader in the RCS archive file, See admin. For more
on configuring the default $Log$ substitution
behavior, See config.
See Log keyword.
$RCSfile$$Revision$$Source$$State$cvs admin -s—see admin options.
Local keywordLocalKeyword option in the CVSROOT/config file
may be used to specify a local keyword which is to be
used as an alias for one of the keywords: $Id$,
$Header$, or $CVSHeader$. For
example, if the CVSROOT/config file contains
a line with LocalKeyword=MYBSD=CVSHeader, then a
file with the local keyword $MYBSD$ will be
expanded as if it were a $CVSHeader$ keyword. If
the src/frob.c file contained this keyword, it might
look something like this:
/*
* $MYBSD: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $
*/
Many repositories make use of a such a “local
keyword” feature. An old patch to cvs provided
the LocalKeyword feature using a tag=
option and called this the “custom tag” or “local
tag” feature. It was used in conjunction with the
what they called the tagexpand= option. In
cvs this other option is known as the
KeywordExpand option.
See Configuring keyword expansion for more
details.
Examples from popular projects include: $FreeBSD$, $NetBSD$, $OpenBSD$, $XFree86$, $Xorg$.
The advantage of this is that you can include your local version information in a file using this local keyword without disrupting the upstream version information (which may be a different local keyword or a standard keyword). Allowing bug reports and the like to more properly identify the source of the original bug to the third-party and reducing the number of conflicts that arise during an import of a new version.
All keyword expansion except the local keyword may be
disabled using the KeywordExpand option in
the CVSROOT/config file—see
Configuring keyword expansion for more details.