Multi vcs roots' .git folder problem


To checkout files with .git folder; "VCS Checkout mode" should be "Always checkout on client". That is ok but when i need to checkout from another vcs root in the same project, "checkout rules" are not supported. So, second checkout write on previous .git folder.


VCS checkout mode is project specific, not specific to VCS root so, this problem happens. Also "checkout rules" not supported when "Always checkout on client" is selected.


Note: Teamcity version is 2018.2


Kind regards.


Comment actions Permalink

I'm not exactly sure what you mean with some of the following, as this statements from teamcity's side seem to be incorrect:

-"checkout rules are not supported". They are. Using multiple git repositories is common place in our own projects, tests, not even counting users. This is widely supported and thoroughly tested, so please be more specific about what exactly you mean.

-"VCS checkout mode is project specific". This is incorrect when considering the TeamCity concept of project. In TeamCity, VCS Checkout mode is defined at the build configuration level. A single VCS Root can have different checkout modes in different build configurations.

-"checkout rules" not supported when "Always checkout on client" is selected. This is also incorrect. They are supported and working. It's well tested.


Please clarify exactly what you mean, because following TeamCity's terminology, those statements are incorrect.

Comment actions Permalink

Hi Denis,

I think there is a miss understanding because I typed wrong as "project configuration", it should be "build configuration".

"VCS checkout mode is build configuration specific" and when I need to use two different vcs roots at the same time in a "build configuration", there is only one "Additional options" and there is only one "VCS checkout mode". 

1- I can not get ".git" folder unless I select "Always checkout files on agent" as "VCS checkout mode". So, in my build configuration, checkout mode is "Always checkout files on agent"

2- When I add my second vcs root to my build configuration with "checkout rules", I got following message from Teamcity: "Failed to perform checkout on agent: Unsupported checkout rules for agent-side checkouts: +:myrootfolder/mysubfolder=>."


Note: Teamcity version is 2018.2.1

Kind regards


Comment actions Permalink

Thanks for the explanation, that clears things enough to where I can respond. Sorry I didn't realize earlier that you were discussing build configurations rather than projects.


As mentioned, checkout rules for agent-side checkout are supported just fine, but there is a limitation to remapping: . There is a feature request in our tracker to add support to remapping with an explanation on why it's not currently implemented and how to work around git limitations.


In short, this is a git limitation, you can simply remove the "=>." and it will work recreating the structure. If you need to move the files, you can use the first build step to move them with a custom script, or under some circumstances move the working directory to match the one generated.


Hope this helps.


Please sign in to leave a comment.