Cool trick of the day - VSS keyword expansion

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/10/14/cool-trick-of-the-day-vss-keyword-expansion.html
Published Tuesday, October 14, 2003 2:35 PM by RoyOsherove

Comments

Tuesday, October 14, 2003 10:57 AM by Scott Galloway

# re: Cool trick of the day - VSS keyword expanstion

Tremendously cool thing! Now...if someone could come up with a regular expression which puts : //$Header: $ at the top of all .cs files in a 'safe' way...my day would be made :-)
Tuesday, October 14, 2003 11:48 AM by Duncan

# re: Cool trick of the day - VSS keyword expanstion

Not so cool - we have VB source code that has been in near constant maintenance since 1997. By now the history is more like an anthology!

So we now have a new rule: the source code is only a snapshot of how the code works right now. History is for the VSS history dialog.

Tuesday, October 14, 2003 1:08 PM by Roy Osherove

# re: Cool trick of the day - VSS keyword expanstion

Dancan: I see what you mean. Still, lots of other good keywords there that I think could be of use..
Tuesday, October 14, 2003 2:12 PM by Matt Berther

# re: Cool trick of the day - VSS keyword expanstion

Duncan: Im with you. When we made the transition to CVS, I went through and stripped all the history out of our .cs files.

Replaced $History with $Id $... So, at the top of the file, I get a one line summary of filename, date/time last committed and who committed it.
Tuesday, October 14, 2003 2:33 PM by Scott Galloway

# re: Cool trick of the day - VSS keyword expanstion

Yup, //$Header: $ does a similar thing - gives a little summary of the latest info. Check out this http://msdn.microsoft.com/library/en-us/guides/html/vstskexpand_keywords.asp?frame=true for all the possibles...
Thursday, July 15, 2004 7:57 AM by Peter Mohr

# re: Cool trick of the day - VSS keyword expansion

Also you could add a region (Vb.NET) around the history....

#Region " File history "

' $Header: $

'

' $History: $

'

#End Region

That way you only see the history if/when you want...
Monday, March 12, 2007 12:13 PM by Prabhu Sadasivam

# re: Cool trick of the day - VSS keyword expansion

In following-up with my last question-

I found the solution. It is using the extended comments in VB (to achive multi-line grouping). Please see example below.

#Region "VSS Log"

#If Comment Then

$Log: $

#End If

#End Region

Thanks, Prabhu