How to: Use Keyword Expansion in a Text or HTML File
Visual SourceSafe can replace certain keywords in a text or HTML file with version information. To use keywords in a file, you must first have keyword expansion enabled by your database administrator, as described in How to: Enable Keyword Expansion.
Keywords used for HTML files are very similar to those for standard text files. Specific keywords are described in Keyword Expansion Support.
Since keywords are case-sensitive, be sure to capitalize them properly Do not use HTML keywords in non-HTML files.
To use keyword expansion in a text or HTML file:
Check with your database administrator to make sure that keyword expansion is enabled for the database and find out what files have expansion enabled.
If you need to make additional local settings, access your Ss.ini file.
In this file, you can set up comment characters and spacing for file extensions that the administrator has not set globally in the Srcsafe.ini file.
You can set the Expand_Keywords_Locally initialization variable in your Ss.ini file or through Visual SourceSafe Explorer to specify if you want files with keyword expansion copied back into your working folder. To improve performance, you can set this variable to No so that the file is not copied back, but you will not have the most up-to-date files.
Now you can add keywords as needed to the files for which expansion is enabled.
The following example uses the current date to automatically update an HTML page each time it is modified.
Last modified on <!--$$JustDate:--!> <!--$-->
Suppose your database administrator does not have a setting for *.c in the Srcsafe.ini file. Visual SourceSafe uses its default, which is an asterisk. You might then put the following code into the header of your Ss.ini file. Visual SourceSafe might expand this to place an asterisk before each line, nothing after each line, and write the name of the file (for example, IDRANGE.TXT) for the keyword.
/* * $History: $ */ * ***** Version 1 ***** * User:mariaj Date:8/01/92 Time:11:02a * Created * Comment: Defined ranges for IDs. */