chrmue
chrmue

Reputation: 1612

how to get an svn revision number of a project?

SVN provides the possibility to get the revision number of a single file with the property $Revision$. This is fine for a single file. I'm using it in a C++ project that consists of several files in a single folder. Is there a similar way to get one single revision number of the complete project ? In my understanding this should be the highest version number of all the files in the project folder.

I already know that it is possible to get the latest revision number using a bash script but I'd like to avoid this.

Upvotes: 0

Views: 906

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97270

If you want to have Global Revision Number per repository, you can use different methods

  • Instead of bash-script just run svnversion (program is part of SVN on any platform) inside working Copy and intercept output
  • For more complex requests you can use subwcrev (part of TortoiseSVN on Windows) or it's Linux brother svnrev (slightly outdated, noreleases from 27 February 2012, may not work with SVN 1.8 Working Copies) at build-stage - store and version "template-file", generate and use "real-file" on demand

Upvotes: 1

Related Questions