Welcome to MSDN Blogs Sign in | Join | Help

How to get changesets/workitems belonging to a particular sub folder (only)?

  1. Edit the tfsbuild.proj and over ride the label task definition. Do note that changes in Name and Files argument. The Files attribute is used to define the scope of labels incase it is disjoint. Name of the label now contains the explicit scope.
  2. Initialize the value of the property GetGhangesetForFolder. The folder should not be team project. For example (1) if your folder is $/teamproject/myfolder, then the value should be "myfolder", (2) if your folder is $/teamproject/myfoldder/component1 then the calue should be "myfolder/component1". 

Add the following stuff to your tfsbuild.proj

<PropertyGroup 

<GetChangesetForFolder>_Component1_</GetChangesetForFolder>

</PropertyGroup>

<Target Name="CoreLabel"

          Condition=" '$(IsDesktopBuild)'!='true' "

          DependsOnTargets="$(CoreLabelDependsOn)" >

    <!-- Label all the latest non deleted files in workspace -->

    <Label

       Condition=" '$(SkipLabel)'!='true' "

       Workspace="$(WorkspaceName)"

       Name="$(BuildNumber)@$/$(TeamProject)/$(GetChangesetForFolder)"

       Version="W$(WorkspaceName)"

       Files="$/$(TeamProject)/$(GetChangesetForFolder)"

       Child="$(ChildLabel)"

       Comments="$(LabelTaskComment)"

       Recursive="$(RecursiveLabel)" />

 </Target>

Additionally note that you do not need to override the LabelQueryScope property.

 

Published Wednesday, April 12, 2006 12:37 PM by ManishAgarwal

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# VSTS Links - 04/12/2006

Anutthara talks about using Team Build with VSS or your own source control.

Paul Whitaker blogs about...
Wednesday, April 12, 2006 9:52 AM by Team System News

# re: How to get changesets/workitems belonging to a particular sub folder (only)?

Hi,
Where do I find <label> definition? I did a reflector on Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll but there is no comment

thanks in advance
Wednesday, May 10, 2006 7:10 AM by laurent

# TeamBuild: Get only changesets and work items related to a subfolder in a project

Wednesday, June 07, 2006 2:59 PM by hacked.brain

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker