Is there any easy way to access the SVN repository revision number and store it in a c++ string in a c++ visual studio application?
Thanks for your help in advance!
Is there any easy way to access the SVN repository revision number and store it in a c++ string in a c++ visual studio application?
Thanks for your help in advance!
If you have tortoise SVN you can use SubWCRev.exe
Create a file called:
RevisionInfo.tmpl
int SvnRevision = $WCREV$;
Then execute this command:
SubWCRev.exe . RevisionInfo.tmpl RevisionInfo.cpp
It will create a file ReivisonInfo.cpp with your revision number as follows:
int SvnRevision = 5000;
From your other files just do something like:
extern int SvnRevision; to access the global variable from within that file.
You could also use SvnRev