views:

160

answers:

1

I know how to get the local version number into a file with Eclipse. Right click, Team, set property then svn:keywords Id.

But how do you get the $GlobalRev$ to appear? There's something called svnversion which is supposed to do this but is it integrated into Subclipse?

+1  A: 

Subversion does not support the concept of a $GlobalRev$ keyword. There is a command line tool called svnversion that will output revisions to stdout. You can combine that with a script to write this to a file. This is asked about all the time, so there is a FAQ:

http://subversion.tigris.org/faq.html#version-value-in-source

If you are on Windows, there is also a command line program available called SubWCRev.exe that is similar to svnversion but will do substitution in a file for you. Note that you cannot use this on a versioned file, you need the combine it with a template file of some kind. See:

http://tortoisesvn.net/docs/release/TortoiseSVN%5Fen/tsvn-subwcrev.html

Either of these could be run from Eclipse by setting up an External Tool command for it.

Mark Phippard
Thanks. Problem is in this case I'm one temporary contractor in a big team some of which is permanent, so it's probably too much to expect everyone to add an external tool to their setups, even if that's the only solution...
joedevon