Keyword Expansion

Enable keyword expansion

Check the Enable keyword expansion to expand keywords located in files of the specified types when committed to the Vault Standard repository.

When this is checked, keywords are expanded on the client machine during the Add and Check In operations. After the commit has completed, the file in the repository and the client machine will be in expanded form.

If a file containing keywords is checked in and there were no modifications made to the file and the option for checking in unchanged files is set to Undo Checkout, then the undo checkout will occur and the keywords will not be expanded. If the unmodified file is checked in and the option is set to force the check in, then the check in will occur and the keywords will be expanded in the new version of the file in the repository.

Since keywords are expanded upon Add and Check In, a Get or Check Out of a file containing keywords will be no different from a Get or Check Out of a file without keywords.

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

$Archive: $

Vault Standard archive file location

$Author: $

User who last changed the file

$Date: $

Date and time of last check in

$Header: $

Logfile, Revision, Date, Author

$History: $

File history

$JustDate: $

Date, without the time addendum.

$Log: $

File history, RCS format

$Logfile: $

Same as Archive

$Modtime: $

Date and time of last modification

$Revision: $

Vault Standard version number

$UTCDate: $

Same as Date, but time is given in UTC

$UTCModtime: $

Same as Modtime, but time is given in UTC

$Workfile: $

File name

$NoKeywords: $

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.

History Keywords

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.

HTML Keywords

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.

Expanding Keywords

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 $

Preserving Spacing – 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.

Time Formats – 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

The default is Unchecked.

Keyword file types

File Extension

Type the file extension to be configured for keyword expansion in the File Extension box. Do not use an asterisk. The file extension is limited to nine characters.

When editing a file extension, you are not allowed to modify this string.

Start of History line

Type the string that will be placed in front of any lines of text that are inserted into a file for the History keyword. This string is limited to 25 characters.

End of History line

Type the string that will be placed after any lines of text that are inserted into a file for the History keyword. This string is limited to 25 characters.

Edit

Once a new keyword file extension has been added, the option of editing the file extension will be included in the table.