Tuesday, February 5, 2008

Getting Keyword substitution to work in SVN

If you have been a long time user of CVS, you will value the use of keyword substitution for identifying file versions, date when the file was last modified, by who and in which file location.

Having switched to SVN recently, I found out that although SVN uses the same keywords as CVS, this feature is not turned on by default!

To turn it on via TortoiseSVN, do the following.
  1. In Windows Explorer, select the root folder of your source files (you need to do this as the setting is not global).
  2. Right click and select "TortoiseSVN" > "Properties".
  3. In the pop-up dialog, click on the "New..." button.
  4. In the field "Property name:", select "svn:keywords" from the drop-down list.
  5. In the field "Property value:", type "URL Date Revision Author".
  6. Check the box "Apply property recursively".
  7. Click "OK" twice.
  8. You're done!

No comments: