Greg's Blog

helping me remember what I figure out

Expanding Keywords

| Comments

In my last work place we had this nifty stuff in place that updated the templates we were working on with version info, modification time and other bits and bobs, when the files were checked back into Visual Source Safe. I thought this was really handy to quickly review what had been happening to a template and that it would be a good idea to apply this in my new job as well. The first hurdle: enabling “it”. Actually figuring out what “it”, this technique, is called should have been my starting point. After some digging I finally stumbled across an article on MSDN and the answer: Enabling expanding keywords.

The info for enabling the keyword expansion can be found here. Essentially using this feature edits your ssafe.ini file and adds the following entry to it (note I work mainly with ColdFusion templates so that is why you see .cfm and .cfc file extensions):

Keyword_Masks = *.cfm,*.cfc

Close the SourceSafe Administrator and SourceSafe Explorer. Now you can re-start SourceSafe Explorer and the changes you made to your .ini file will have been read in and applied. Now all you need to do is add these keywords that are to be expanded to your development templates. A list can be seen here. In the end I settled for these and stuck them between <cfsetting> tags to suppress the output of white space:

<cfsetting enablecfoutputonly=”yes” />
<!—
$Archive: $
$Author: $
$Date: $
$History: $
$Logfile: $
—>
<cfsetting enablecfoutputonly=”no” />