How to activate the $Id:$ keyword on files in an existing Subversion repository

This is a quick update to my earlier post about using svn keywords:

If you have a Subversion repository already full of files, and you want to activate the $Id:$ keyword on all of them so it expands out to something like:

$Id: index.php 783 2006-04-27 06:05:24Z gserafini $

whenever you check in the file, then use this command:

find . \! -name "*\.svn*" -name "*.php" -exec svn propset svn:keywords "Id" {} \;

This finds all *.php files that are NOT in .svn directories and sets the svn keyword property on each file.

Substitute other filename extensions for the .php that you want to activate the keyword expansion on. Then commit the files and the next time you make a change it will update the $Id:$ tag.

, , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

sell diamonds