Each file has a stored default substitution mode, and
each working directory copy of a file also has a
substitution mode. The former is set by the -k
option to cvs add
and cvs admin
; the
latter is set by the -k or -A options to cvs
checkout
or cvs update
.
cvs diff
and cvs rdiff
also
have -k options.
For some examples,
see Binary files, and Merging and keywords.
The modes available are:
$
Revision: 5.7 $
for the Revision
keyword.
cvs admin
-l
is in use.
Revision
keyword, generate the string $
Revision$
instead of $
Revision: 5.7 $
. This option
is useful to ignore differences due to keyword
substitution when comparing different revisions of a
file (see Merging and keywords).
Revision
keyword, generate the string
$
Revision: 1.1 $
instead of
$
Revision: 5.7 $
if that is how the
string appeared when the file was checked in.
Revision
keyword, generate the string
5.7
instead of $
Revision: 5.7 $
.
This can help generate files in programming languages
where it is hard to strip keyword delimiters like
$
Revision: $
from a string. However,
further keyword substitution cannot be performed once
the keyword names are removed, so this option should be
used with care.
One often would like to use -kv with cvs
export
—see export. But be aware that doesn't
handle an export containing binary files correctly.