Next: , Previous: branches, Up: get


3.5.4 Keyword Substitution

Keyword substitution is performed unless the -k option or the -e option is given to get.

what contains a keyword substitution example.

The keywords are all of the form ‘%x%’ where x stands for an upper-case letter, one of:

A
Expands to the same as ‘%Z% %Y% %M% %I% %Z%’.
B
The branch number of the gotten version
C
Current line in the output file
D
The date at the time the file was gotten, in the form yy/mm/dd. The year is always represented as two digits but this is not ambiguous since the two-digit year is no later than 2068 (see Year 2000 Issues).
E
The date that the newest delta in the gotten file was applied, yy/mm/dd. The year is always represented as two digits but this is not ambiguous since the two-digit year is no later than 2068 (see Year 2000 Issues).
F
Name of the sccs file, for example ‘s.foo.c’.
G
As for %E%, but in the US format mm/dd/yy.
H
As for %D%, but in the US format mm/dd/yy.
I
Expands to the same as %R%.%L%.%B%.%S%, that is, the sid of the retrieved version.
L
The level number of the retrieved version.
M
Module name: the value of the m (module) flag, or the base name of the sccs file with the s. removed if the module flag is unset.
P
Full name of the sccs file.
Q
Value of the q flag. The q flag has no other purpose, and can be set with ‘admin -fqfoo’. See Flags.
R
Release number of the retrieved version.
S
Sequence number of the retrieved version.
T
Current time (hh:mm:ss) when the file was retrieved, see %D% and %H%.
W
Expands to %Z% %M% <tab> %I% or the argument for the -w flag, if given.
Y
Value of the t (module type) flag.
Z
The literal string @(#). See what.

Some of the keywords listed above have expansions that are described in terms of the contents of other keywords. This expansion is performed as if the ‘y’ flag in the sccs file is not set. For example, ‘admin -fyA’ will cause the ‘%I%’ keyword not to be expanded, but the ‘%A%’ keyword is still fully expanded, even though it is defined in terms of ‘%I%’.