Re: Why does `svnversion -c` give me a range?
From: Ryan Schmidt <subversion-2012c_at_ryandesign.com>
Date: Wed, 4 Dec 2013 06:14:33 -0600
On Dec 4, 2013, at 06:00, Cooke, Mark wrote:
> I would like to include the svn revision number in my project's version info but I am confused by the results of svnversion. I want the version number of a tagged tree to always be the same (i.e. the last commit to the tag) but if the tag is to be rebuilt using a fresh checkout some time later `svnversion` seems to report the HEAD revision. So I looked at `svnversion -c` but this always seems to give me a range e.g. `2:1476`, even directly after an update.
I think the `-c` option means: given all the item in this directory and recursive subdirectories, give the oldest and newest changed file. So, the oldest item in your working copy was last changed in revision 2, and the newest was last changed in revision 1476.
And `svnversion` without any flag does seem to give the latest revision to which the working copy was updated, not the last changed revision.
If you want the last changed revision, you could use:
svn info | sed -n 's/^Last Changed Rev: //p'
|
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.