When building our apps, I've been using SubRev to get the latest revision of the checkout from Subversion, and write it into a file that enables this version to be displayed in the UI. Unfortunately this requires a full checkout on the Agent, and I'm trying to get away from that where possible, as this process is hard to interrupt when you want to cancel a build job.
I thought I'd be able to use %build.vcs.number.MyProject%, but the number provided doesn't seem to bear any relation to the latest revision number in either the trunk or root of the project, or even the latest revision in the repository - it's almost as if the number is picked at random. Does this indicate a configuration issue with TeamCity and Subversion?
Or, is there another way I can get the latest revision of the code I've just exported (specific to the trunk or branch I'm building from)?
UPDATE - It seems that %build.vcs.number.MyProject% is correct when triggered by a VCS change, but not if I run the builds manually. Is this expected behaviour?