build.vcs.munber.1 - how does it work?

I am new to TeamCity (but not to config management :D ). I have a query regarding how the build.vcs.number is retrieved from the vcs. In my case its subversion.

Here is why I ask.

I have setup a single vcs root to my suversion repository. I have setup two projects, from different branches, with different checkout rules based on the one vcs root. my general settings for both projects include the build.vcs.number.1 property.
Some development is carried out and builds commence.
Looking at the build logs I see the same revision number being passed into the build number format for both projects even though the revision number is not common.

I would like to have the revision number from the branch being built. I have tried creating two vcs roots which point to the specific branches but this had no affect on the revision being passed. have I missed something or is this just they way teamcity does it?

thanks

3 comments
Comment actions Permalink

I think that this is due to the way that SVN handles revisions. The repository as a whole shares a single revision, no matter how we may logically set it up. This 'global revision' is the property that is returned by TeamCity.

I imagine that you could write a custom build number plugin to provide this information (see the plugins forum and the plugins repository as I think there has been some recent work done with a custom build number plugin). Before doing that though, consider this: The SVN (if this plugin is done correctly), the sources in the tree specified and identified by your custom revision number will be EXACTLY the same as the sources identified by the repository revision. So, in my opinion, there is very little benefit to not using the global repository revision. This number provides the basis for identifying the repository view at the exact moment the build is started.

hope this helps!
ray

0
Comment actions Permalink

Hi!

We have the issue filed already: http://jetbrains.net/tracker/issue/TW-4527

For the time being it is not of high priority.

Can you please explain why the highest repository revision is not suitable in your case?

--
Best regards,

Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

In our build process we use the revision number as part of the version numbering of the product. If we have two branches building the same product then taking the global repository revision number may result in two seperate builds which can't be told apart.

I'll havea look in the plug-ins and see what is there and also have a look to see if we can't arrange our builds to work round the problem.

thanks for the info

0

Please sign in to leave a comment.