How Does Multiple VCS Roots Work?

What is the effect of having multiple VCS roots set up on a single build configuration?  I noticed I had done this, purely accidentally, when I saw that a check in to one repo was triggering two different build configurations.  I see that, obviously, changes in either will trigger builds.  But as far as source files on disk, do they share the same directory?  How are file name collisions handled?

5 comments
Comment actions Permalink

Multiple VCS roots per build configuration make sense if they are checked out into different folders. For example, this is the case of TeamCity itself - we have plugins that are stored in Subversion while the core of the system is in Perforce and some of these plugins are bundled with TeamCity. We have two VCS roots (Perforce & SVN) and for Subversion VCS we set checkout rules: +:.=>svnrepo Thus plugins go to the svnrepo subdirectory.

Having two VCS roots pointing to the same directory is not recommended. However in some cases this will work because TeamCity checks out sources in the same order as VCS roots are defined for the build configuration.

0
Comment actions Permalink

Interesting.  I get it now.  Thanks for the info Pavel.

0
Comment actions Permalink

Actually I don't totally get it yet.  When I look at the build config, I see only one space for 'Checkout Directory', even though there are two vcs roots.  How would I go about checking them out into different folders?

0
Comment actions Permalink

For each VCS root there is a link "Edit checkout rules", this is where you specify what folders to checkout and where to place them.

0

Please sign in to leave a comment.