Rick van den Bosch - Blog

... on .NET, software architecture, software development and whatnot

Recent Posts

Tags

News

Community

Email Notifications

Blogs I read

Interesting links

Archives

Did you know... Visual SourceSafe "Keyword Expansion Support"

Although we're not using SourceSafe at my current project (yet), I found out about a cool feature recently: Keyword Expansion. It enables you to get information about the revision, date, author and so on of the version of the file you are looking at inside the file itself. This way you can see version information in the comments of your code-file, without even starting SourceSafe.

Taken from an MSDN entry about VS2k5:
Visual SourceSafe supports keyword expansion, a process that enhances with version-specific information certain keywords that you place in your text and HTML files. When you add or check in a file that contains these keywords, in comments, Visual SourceSafe looks for the keywords and automatically places relevant version-specific information after them. For example, the string $Revision: $ tells Visual SourceSafe to expand the Revision keyword automatically with the current file version number.

Read this entry (SourceSafe 6 also supported) for more information and a howto...

Comments

Rick van den Bosch said:

Keyword Expansion is something to be careful with as it encourages duplication of information that is already available within the source control system and bloat of source files. Most source control systems (I currently am a happy Subversion user) provide easy access to this historical information.

I am currently working with sources that have contain several pages of historical comments that have no value whatsoever and make browsing the code a lot more hassle. For that reason I tend to strip out the keyword expansion code.
# June 29, 2005 11:45 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)