tags:

views:

226

answers:

1

I have multiple svn roots configured in TeamCity. They all point to the same repository, but different paths (branches). All branches return the same value for revision. I want the branch specific revision numbers.

Here is an excerpt from the build log after I've dumped all the defined properties:

vcsroot.3_0_11__SP6_.url = https://svn.devlan.local/Enigma/branch/release/3.0.11/
vcsroot.trunk.url = https://svn.devlan.local/Enigma/trunk/
system.build.vcs.number.trunk = 9602
system.build.vcs.number.3_0_11__SP6_ = 9602

Clearly different locations in the svn tree, but same revision number.

How can I get branch specific revision numbers?

+2  A: 

You just need to make multiple VCS Roots in your Administration settings and apply each one to the appropriate build. For instance, if

  • svn://196.168.0.1/software

is your SVN repository, then you might have VCS Roots for each of the following projects:

  • svn://196.168.0.1/software/agent/trunk
  • svn://196.168.0.1/software/server/trunk
  • svn://196.168.0.1/software/database/trunk

"Branch-specific" revisions is sort of a misnomer, but each of those VCS Roots will use the branch's most recent repository revision number in its build.vcs.number.

ladenedge
I am set up as you describe. Yet all roots return the same build.vcs.number.
Josh Buedel
I think I was dealing with a bug in TeamCity. Since asking this question I've upgraded us to TC 5.1.1 and it works as you describe.
Josh Buedel