Page 1 of 1

SVN Info in PHP Files

Posted: Thu Sep 06, 2007 6:21 pm
by ecomeback
If I take a look in php files there is often a line like

Code: Select all

/* SVN FILE: $Id: file.php 2345 2007-09-06 15:41:35Z dev $ */

Is it possible to send SVN data to the PHP files, like the author, the date or the vision?
How does it work?
I don't think it is handwork, is it? I can't find any informations about this.

Greetings
ec

Re: SVN Info in PHP Files

Posted: Thu Sep 06, 2007 10:32 pm
by tstahl
It's a keyword substitution feature of subversion. You have to set a subversion property to your file.
Example for the command line interface:

Code: Select all

svn propset svn:keywords "Id" yourfile.php

The procedure is different with other subversion clients(subclipse, tortoise,..)
Read more about keyword substitution at http://svnbook.red-bean.com/en/1.4/svn. ... words.html

Re: SVN Info in PHP Files

Posted: Fri Sep 07, 2007 9:02 am
by ecomeback
Ahhh... yes.

Thanks, its easier as it seems, but you have to know, how does it work. ;)