How to exclude certain subfolders from showing changes

Hello all,
At my company we just recently started trialing TeamCity, and its probably the easiest to use CI software that I've seen, not to mention the features it comes bundled with are great.

There is one thing that is annoying me though. I cannot seem to exclude subfolders from a VCS showing up on the project page. I can prevent them from triggering just fine, but it seems like it refuses to ignore it:

The situation is this, imagine a folder A

A has two .slns in it, we'll call them B and C.

B and C slns each have a folder under A dedicated to them, call them E and F

B is associated with E, but not F. Vice versa for C

I create a configuration for both B and C, but in order to get updates to the .sln file, I have to place my VCS as A, which means that when someone checks into F it shows up as a "Pending" change on B. I've prevented a checkin on F from triggering B, but I'd like it if the change wouldn't show up at all.

I attempted to add VCS checkout rules for B (specifically the rule is along the lines of -:Products\source\ A \ F), but that doesn't seem to work. Any advice?


Thanks,
-James

1 comment
Comment actions Permalink

I've used a pattern of removing the root folder "." first and then adding back only the items I needed. This works to arbitrarily add the folders that you want for each project. This also saves a lot of checkout time on the build agents when you have _everything_ in a single root folder but only want to build small subsets.

For:

FolderA/
    SolutionOne/
    SolutionTwo/ <- ignored
    SolutionThree/
    SolutionOne.sln
    SolutionTwo.sln <-ignored
    SolutionThree.sln

Try:

VCS Root Folder = FolderA
VCS Checkout Rules:
-:.
+:SolutionOne
+:SolutionOne.sln
+:SolutionThree
+:SolutionThree.sln


Then to build just SolutionTwo the VCS Checkout Rules would be:
-:.
+:SolutionTwo
+:SolutionTwo.sln

YMMV slightly since this is off the top of my head, we actually kept our solutions and files in sub-subfolders, but I'm sure the idea will work the same. Let me know if you need more examples.

0

Please sign in to leave a comment.