masimplo
masimplo

Reputation: 3774

Cannot properly configure teamcity to play along with mercurial when using multiple repositories not belonging in the same folder

I am trying to setup TeamCity build server. I am also using mercurial repositories.

My project structure is:

Main Folder
 -Windows Form Application Repository
 -Class library 1 Repository
    -files subrepo 1
    -files subrepo 2
    -files subrepo 3
 -Class library 2 Repository

I created a project in teamcity, added the 3 VCS to the project without specifying a checkout directory and the result was files from all 3 repositories in one checkout directory, resulting in build error. I then went and changed the checkout directory of each VCS to C:\Projects. This resulted in a correct folder structure but no files in them (as if hg pull operation was done but not hg update).

Has anyone had any similar experience because I cannot find anyone complaining about such a scenario.

Upvotes: 1

Views: 1162

Answers (2)

neverov
neverov

Reputation: 1293

You can set checkout rules for each of your repositories. Checkout rule of the form

+:.=>subdir

will checkout all the content of your repository to the specified subdir (see here for details).

As I understand your 'Class library 1 Repository' has 3 subrepositories. At the moment subrepositories are not supported with server-side checkout and checkout rules are not supported with agent-side checkout (here is an issue to vote/watch for).

As a workaround, you can create separate VCS root for each subrepository, but in this case TeamCity checkout the latest version of you repository, not the tracked commit from .hgsubstate.

Upvotes: 2

Ian Mercer
Ian Mercer

Reputation: 39277

You should be able to do all of this using a single .hgsub in the root folder that will automatically bring in all of your other repos. You should have a single VCS root in TeamCity that pulls from the root.

Upvotes: 0

Related Questions