SVN Keywords: Automating the Modification History Header

Remember the days of manually editing the modification log in the header comment of your source? If you have SVN you can leverage SVN Keywords to automate inserting the log information. This way you never forget and each checkin has a revision number in the file!
Here's How:
  • In the source file header comments type:
    /*
    This is inside a Comment Block.
    
     $Author$
     $Date$
     $Rev$
    */
    
  • Select source files
  • Right Click > Tortise SVN > Properties
  • Select New
  • For Property Name select svn:keywords from drop down list
  • For Property Value paste: Author Date Rev Id
  • Commit
The source will be modified to read:
/*

This is inside a Comment Block.

 $Author: authorname $
 $Date: 2011-05-04 14:51:48 -0400 (Wed, 04 May 2011) $
 $Rev: 55648 $
*/
A little crusty but automated!

0 comments: