Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TeamCity - How can I copy a VCS Root?

Tags:

teamcity-9.0

Does anyone know if its possible to copy a VCS Root in TeamCity? The normal trick of going into the edit page and dropping down the Actions combo doesn't work, only has Move as an option.

like image 550
Luke Puplett Avatar asked Jun 03 '16 11:06

Luke Puplett


2 Answers

The only approach I found was to create a project, attach the VCS root to the project, then edit it from the project "apply only for (a copy will be created)", then move the result to the root again.

Note that you have to be at build level in order to do this. You cannot do it from any place higher up the hierarchy, or the "apply only for..." option will not be shown.

like image 64
Judson Avatar answered Sep 20 '22 09:09

Judson


You are correct, there is no action that I can find to copy a VCS Root, but the question is why do you want to copy it. If you have several entities sharing a VCS Root, and want to make some changes that would affect only one of those, Teamcity has you covered: just go to the entity, select to edit the common VCS Root, and when you want to save, just over the 'Save' button, Teamcity offers two radio buttons:

  • Apply to [current entity] only (a copy of this VCS root will be created)
  • Apply to all build configurations and templates

Then you can just pick the first option, and a copy with the changes is created on the fly.

like image 20
Emmanuel Touzery Avatar answered Sep 19 '22 09:09

Emmanuel Touzery