svn revision number in file

09 Jul 2009

svn propset svn:keywords "[Rev|Id|Date|Author|URL]" file Then add $Rev|Id|Date|Author|URL $ and commit the file. tada.

$ svn propset svn:keywords "Rev" myfile.txt
$ vi myfile.txt

>   $Rev: $

$ svn ci -m 'Add revision id to file' myfile.txt
$ less myfile.txt

> $Rev: 768 $

Same with the other tags of Id, Date, Author, URL

Comment 2009-07-09 by None

I'm a fan of just setting this in my svn config file:

* = svn:keywords=[Rev|Id|Date|Author|URL]

...then all new files get it for free.