tags:

views:

30

answers:

2

Hi I want to replace a global revision no (head) in my PHP source files whenever I make a checkin (or update)

for example I have below code

<?php 

print 'Rv no : $glbRevisionNumber$';

?>

in all the php files that have under one folder eg. myapp/* the $glbRevisionNumber$ should get replaced with the current head revision number.

How can I achieve this ?

A: 

Create a pre-commit hook in your version control system that does a replace of $glbRevisionNumber$ in every committed file.

zwip
A: 

Have a look at svn pre-commit-hooks:

http://wordaligned.org/articles/a-subversion-pre-commit-hook

Here are some example scripts:

http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/

JochenJung