Reputation: 1
I would like to inject the revision number in source code on commit. I found out that I could do it through svn shell by doing something like:
find . -name *.php -exec svn propset svn:keywords "Rev"
However someone else said that that would not work as there are no files in the repository (as they files are encrypted), and I should be able to do it in tortoiseSVN. I found the "Hook Scripts" section, but I have completely no experience with this stuff.
Could you give me some indication how the command should look like, if I would like to have the first lines of code look like:
/*
* Version: 154
* Last modified on revision: 150
*/
I know that you could inject by using $ver$ but how to do it so only files in certain directories with certain extensions get this changed.
Upvotes: 0
Views: 1010
Reputation: 8611
Don't write your own method for injecting version numbers. Instead,
$Revision$
, etc.) in the files you want the replacement to happen forsvn propset svn:keywords Revision
or some such) for those filesUpvotes: 4