How do I enable Keyword expansion

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply
arthur.anderson
Posts: 10
Joined: Mon Mar 15, 2004 11:35 am

How do I enable Keyword expansion

Post by arthur.anderson » Mon Mar 15, 2004 11:38 am

When I use Visual Source Safe I can have keywords expand when checking in and out files. I am using the same keywords and SourceOffsite with the same Visual Source Safe but the keywords are not being expanded. Is there a way to enable this?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Mon Mar 15, 2004 1:28 pm

What version of SOS are you using?

Keyword expansion using SOS should work.

As long as keyword expansion is properly configured in the SourceSafe
'srcsafe.ini' and 'ss.ini' files, keyword expansion should work in SOS the
exact same way it works in VSS.

What type of file are you trying to use keyword expansion in? Is that file extension configured for keyword expansion in the VSS Admin Client?

If you use VSS, does keyword expansion work for the same files that don't expand keywords in SOS?

Please send us your 'srcsafe.ini' and 'ss.ini' files if you continue to
encounter problems.
Linda Bauer
SourceGear
Technical Support Manager

thomasmathiesen

Where do I set the keyword expansion

Post by thomasmathiesen » Wed Jun 16, 2004 7:57 am

Maybe I am lazy, but can someone tell me how to enable keyword expansion in the ss.ini and srcsafe.ini?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Jun 18, 2004 4:20 pm

Keyword expansion options can be configured in the SourceSafe Explorer and SourceSafe Admin Client. The SS Explorer modifies the ss.ini file and the Admin Client modifies the srcsafe.ini file. These modifications can be made directly as well.

According to SourceSafe Help:

To enable keyword expansion
On the VSS Administrator Tools menu, click Options.
Click the General tab if it isn't already selected.
In the Expand Keywords in Files of Type box, enter the types of files in which you want keyword expansion to occur; for example, *.txt.
If you use more than one extension, you must separate them with commas; for example, *.txt, *.c, *.vb.
Click OK.
Note You can also enable keyword expansion by adding Keyword_Masks = *.txt to the SRCSAFE.INI file on the server. Place it before the first occurrence of a section header, for example, [$/MyProj]. Again, if you use more than one extension, separate them with commas.
Quit the Administrator program and tell all your users to close and restart VSS Explorer for the change to take effect.
Expand_Keywords_Locally Initialization VariableSee Also
Initialization Variables | Add Files Command (File Menu) | Check In Command (SourceSafe Menu) | Local Files Options Tab | Use Keyword Expansion in HTML Files | Expand Keywords
Controls whether VSS automatically replaces keyword-expanded files in your working folder.

Syntax
Expand_Keywords_Locally = {Yes|No}
Example
Performs the Get command automatically after any Check In or Add command that causes keyword expansion:

Expand_Keywords_Locally = Yes
Remarks
When you check in a file and have keyword expansion enabled, VSS may replace certain keywords in your file with version information. The modified file is copied back into VSS. If this variable is set to Yes, the modified file is then copied directly back into your directory. If you set this variable to No, the file is not copied back; this improves performance, but the copy in your working directory may not be completely up-to-date.

You can also set this variable in your SS.INI file by using the Copy Keyword-Expanded Files Into Working Directory option on the Local Files tab in the SourceSafe Options dialog box.
For more information, see SourceSafe help.
Linda Bauer
SourceGear
Technical Support Manager

joemommaca

Keyword Expansion

Post by joemommaca » Fri Sep 30, 2005 10:09 am

This great... But can you tell me how to define what comment characters VSS should use for each file type when expanding keywords? The default of /* doesn't work for all filetypes....(i.e. for sql files '--' )

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Sep 30, 2005 10:44 am

Here's a helpful link on keyword expansion in VSS with SQL files:

http://www.dbazine.com/sql/sql-articles/cook11

We don't have a guide to comment delimiters for each type of file or code. You could do an Internet search on "comment out" or "comment delimiter" plus the specific type of file to get the info you need.
Linda Bauer
SourceGear
Technical Support Manager

joemommaca

Thanks!!! You're the Best!!!!

Post by joemommaca » Fri Sep 30, 2005 11:07 am

:D :D :D

That's EXACTLY what I was looking for and have not been able to find anywhere on the internet... Not so much about the sql files, but the syntax to define the comment delimeter for all files.

Thanks again

Post Reply