12
votes

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?

1

1 Answers

6
votes

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.