Subversion Keyword Substitution

I don't know when and why this this started but it has become an old habit of mine when I inherit any legacy projects.

Put all $Id$ tag at head of the file after the <?php opening tag. Note that the keyword Id is a substitution for Revision, Date, and Author.
<?php
// $Id$

Set keywords property to all php files
$ svn -R propset svn:keywords "Id" *

Commit the property changes and update local copy
$ svn commit -m "set keyword property" *
$ svn up

See the result
$ cat test.php

<?php
// $Id: test.php 12 2011-08-28 13:09:48Z foobar $

No comments:

Post a Comment