Keyword Expansion refers to SourceAnywhere's feature of placing certain information directly into your file to create a file header for you. To use this feature, you place certain keywords into the text of your file in comments so that it does not affect your code. When you add or check in the file, SourceAnywhere looks for these keywords, and places the relevant information after them.
Keyword expansion requires SourceAnywhere to scan each file for keywords, it can
considerably slow the Check In and Add Files commands.
The following table is a list of all SourceAnywhere keywords.
To expand keywords:
Type this keyword | To add the following |
---|---|
$Archive: $ | SourceAnywhere archive file location. |
$Author: $ | User who last changed the file. |
$Header: $ | Logfile, Revision, UTCDate, Author. The time is given in UTC. |
$History: $ | File history. The time is given in UTC. |
$Log: $ | File history, RCS format. The time is given in UTC. |
$Logfile: $ | Same as Archive. |
$Revision: $ | SourceAnywhere version number. |
$UTCDate: $ |
Date and time of last check in. The time is given in UTC. |
$UTCModtime: $ |
Date and time of last modification. The time is given in UTC. |
$Workfile: $ | File name. |
$NoKeywords: $ | No keywords expansion for all keywords after it. |
For example, you could place the following in a file:
$Revision: $
Upon check in, SourceAnywhere would replace it with:
$Revision: 10 $
The next time you check in the file, the 10 is replaced by a 11, and so on. Without running SourceAnywhere, you can always look at the top of your file to see the version number of your file copy.
Note:
The Keyword Expansion File Types window allows you to specify the file types in which SourceAnywhere keyword expansion occurs.
Lists all the keyword expansion file types in the current repository.
Adds a keyword expansion file type. Click Add to display the Add Keyword Expansion File Type dialog box.
Edits the selected keyword expansion file type. Click Edit to display the Edit Keyword Expansion File Type dialog box.
Removes the selected keyword expansion file type.