Keywords allow you to specify strings in your source control files that get expanded to contain dynamic content in the file when retrieved to a client.
Keywords must be enabled in the Admin Web Client before they will work on files. Also, they only work on file types that are specified in the Admin Web Client.
Following is a list of supported keywords. This list is identical to the list in Visual Source Safe with the addition of UTCDate
and
UTCModtime
.
Type this keyword |
To add the following |
---|---|
|
Vault Professional archive file location |
|
User who last changed the file |
|
Date and time of last check in |
|
Logfile, Revision, Date, Author |
|
File history |
|
Date, without the time addendum. |
|
File history, RCS format |
|
Same as |
|
Date and time of last modification |
|
Vault Professional version number |
|
Same as |
|
Same as |
|
File name |
|
No keyword expansion for all keywords that follow |
Keywords are case-sensitive and must not include any blank space between the first dollar sign and the colon. Blank space and/or arbitrary text can be included between the colon and the trailing dollar sign.
The History and Log keywords expand to the file’s current repository path. They result in additional lines being inserted in the file on the line following the keyword. These inserted lines are subsequently treated as text, so no further expansion or changes will occur in them (unless they, in turn, contain keywords).
You can specify optional start and end strings to be placed before and after the inserted lines. For example, “.c” files could be configured to place /* and */ around inserted lines to make them comments.
Two dollar signs can be placed in front of a keyword to specify that it should be formatted as HTML. For example:
$$Author: $
will expand to
$$Author: -->Fred<!-- $
This allows the keyword control characters to be hidden in a document as comments like this:
Last edited by: <!-- $$Author: -->Fred<!-- $ -->
Note that this does not apply to history lines inserted into a file.
When a keyword is expanded, the new information is placed between the colon and the trailing dollar sign. Any existing text is replaced. For example:
$Author: this is some text $
will expand to (assuming Fred was the last person to change the file)
$Author: Fred $
Blank space can be preserved inside a keyword by using two colons. For example:
$Author:: $
will expand to
$Author:: Fred $
Note that this does not apply to history lines inserted into a file.
Dates and times are presented in ISO 8601 format. Time zones are always included, but can be displayed as a number offset ("-06:00" for CST) or "Z" (for UTC time). All times are in 24-hour format, so the AM/PM designator is no longer present.
An example in non-UTC format:
2003-06-30 13:25:57-06:00
An example in UTC format:
2003-06-30 19:25:57Z