SVN Info in PHP Files

If you have any 'mechanical' forge related issues/suggestions, pop them in here.

Moderators: RussW, RobInk, ChiefGoFor, facedancer

Post Reply
ecomeback
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri May 18, 2007 7:29 pm
Contact:

SVN Info in PHP Files

Post by ecomeback » Thu Sep 06, 2007 6:21 pm

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

tstahl
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jun 30, 2007 8:42 am

Re: SVN Info in PHP Files

Post by tstahl » Thu Sep 06, 2007 10:32 pm

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

ecomeback
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Fri May 18, 2007 7:29 pm
Contact:

Re: SVN Info in PHP Files

Post by ecomeback » Fri Sep 07, 2007 9:02 am

Ahhh... yes.

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


Post Reply