getting revision number into text file inside the working copy folder
From: Jannis <bt_jannis_at_yahoo.de>
Date: Fri, 25 Nov 2011 16:06:17 +0000 (GMT)
Dear subversion users,
I am trying to automatically get the actual revision number of my subversion repository into a text file inside the subversion project.
More precisely, I am using subversion to keep track of the changes I do to the code of several R packages. These packages contain a file named "DESCRIPTION" containig (amongst other) the following line:
Version: 0.5.0.1
When I "build" these packages into *tar.gz R packages (by running R CMD build ... ) this version number is automatically used as the number for that R package and can be accessed easily from within R by running sessionInfo() after loading this package.
Now I would like to have the last digit (1 in this case) to resemble my subversion revision number to get a direct reference from within R to the version of the code that was used to compile the package.
I did the following:
1. run the following in the folder where DESCRIPTION is:
svn propset svn:keywords "LastChangedRevision" DESCRIPTION
2. And changed the relevant line in DESCRIPTION to:
Version: 0.5.0.$LastChangedRevision$
This works partially but changes the line in DESCRIPTION to (for example):
Version: 0.5.0.$LastChangedRevision: 28 $
I need, however:
Version: 0.5.0.28
Is there any way to achieve this? In case you have any solution, try to post it understandable to a SVN-newbi :-).
Thanks for your help!
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.