SVN Checkout to subfolder automatically

With the way SVN seems to work by default it checks out all the files into the work/hash directory by default. Is there any way for me to set a rule so a SVN root always checks out to a subfolder? Normally when you checkout with svn it places the files in a subfolder that has the same name as the last subfolder of the svn path. Basically I am just looking for a way to emulate this behavior without having to set rules for every configuration.

6 comments

Hello Adam,

   Why it is important for you to have folder names after your project names? You can also see the path to the project from the build log.

   Regards,
   KIR

0

Well say you setup 2 SVN roots, then select them to check out on the Agent. This doesn't work because they both try to checkout to the root directory, and because of this your first checkout get wiped out.

Also some of our projects have the same folders underneith their SVN location eg:

repo1/trunk/src
repo1/trunk/lib
repo2/trunk/src
repo2/trunk/lib

If I make repo1/trunk and repo2/trunk roots they both checkout their data to the same place so all the data get mixed up.

0

Hello Adam,

   I believe there is some confusion.
   If I create 2 VCS roots, one svn://repo/project1/trunk and another svn://repo/project2/trunk, and will create 2 build configurations for them, TeamCity will create 2 different checkout directories with different names. This will work automatically, there is no need to specify anything in "Checkout directory" field for this to work.

  Or I'm missing something?

  Regards,
  KIR

0

If both roots are used in the same configuration is when it causes problems. This is what I am trying to do as most of the projects we build require data from multiple repos.

Basically what I am looking for is for SVN in teamcity to behave like command line svn so that when I do:

svn co svn://repo1/trunk/data

It checks everything out into the subfolder data, not the contents of data to the current directory like TC does.

I hope that is a little more clear, but I have a feeling I have just confused the issue more.

-Adam

0

Hello Adam,

  TeamCity supports multiple VCS roots checkout using Checkout rules.
  For your first repository, which ends with data1, you set checkout rules
  . => data1
  for repository data2 you set rules
   . => data2.

   If you use same main repository, you can attach it once and use checkout rules only to configure target directory:

   data1/trunk => data1
   data2/trunk => data2

   Please read more about checkout rules in our docs.

   Hope this helps,
   KIR

0

I figured this was going to be the answer. I was just hoping that there was something I was missing.

Because some roots will be shared between most of our configurations I was hoping to not have to set rules for it for every configuration it is part of and just either set it once or have a way for it checkout like the command line version.

Thanks for you help!

-Adam

0

Please sign in to leave a comment.