Setting the $Id$ tag in svn

I keep forgetting this so here is a short memo..

To enable the setting of $Id$ edit your ~/.subversion/config and remove the comment or add
enable-auto-props = yes
under [miscellany]
and
*.php = svn:keywords=Id
under [auto-props]
you can of course add other file types as well, the .php one was just an example.

After this you can run
svn propset svn:keywords Id file.php
to set the value for $Id$ in an existing file. (just remember to add the $Id$ and commit the file..)
Then when you check out the file again you will see somethin similar to this
// $Id: functions.php 22 2010-10-24 12:21:21Z henrik $

There is a lot of other nice things to look at in the subversion config, but this is a good start!

Basically this post keeps me from having to google up pages such as this and go digging in the svn book all the time..
And now I got a chance to share two awesome links as well!

Share

Leave a Reply

Your email address will not be published. Required fields are marked *