Setting the $Id$ Tag in Subversion

Some excerpts from: Setting the $Id$ Tag in Subversion [StartupCTO]<br />/* * @author David Ordal, david -at- * @version $Id$ * */

If you want something like:

<span class="coMULTI">/*
 * @author David Ordal, david -at-
 * @version $Id: test.php 110 2009-04-28 05:20:41Z dordal $


Configure subversion to automatically add the $Id: $ tag

Set your ~/.subversion/config with the following info:

enable-auto-props = yes

*.php = svn:keywords=Id
*.js = svn:keywords=Id
<br />

Set props on existing files

That configuration will automatically apply the svn:keywords property (which sets the $Id$ tag) to all new
files. But what about existing files? For these, you’ll have to set the
property manually. Go to the root of your source tree, and run this

find . \( -name “*.php” -o -name “*.js” \) -exec svn propset svn:keywords Id {} \;

Leave a Comment