Our team uses a Subversion server to revise and store our code, and I was wondering if anyone knows a good, platform-independent way to access the SVN revision from within the code of the program.
I’ve seen a ANT build script that uses svnversion, but that would only work properly on Linux or OSX machines, and it doesn’t use the SVN client built-in to NetBeans on Windows.
If anyone has a good method of achieving this, I’d love to know It’d be very helpful for the team I’m in, and likely many others that use Version Control.
-Sean “CyberKitsune”
Lead Programmer for the NeoBots
For the automated builds of the C++ WPILib libraries we use sliksvn (a command line svn tool) and a .vbs script that executes an svn command and gets the version number. It uses it to name the installer based on the svn version number.