Hi,

 

If you want to limit the scope, you should adjust the workspace path for
that build.  i.e. Setting the workspace for that build to
$/ProjectName/Development would then only affect items under that
branch/folder.

 

 Wes

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthew Hunter
Sent: Friday, April 11, 2008 3:27 AM
To: [email protected]
Subject: RE: [OzTFS] Build Upgrade from TFS 2005 to 2008 issues

 

Mystery solved.

 

I needed to: 

1.       Add BuildUri="$(BuildURI)" to the label task

2.       Appended $(LabelQueryScope) to the Name value in the label task

3.       Override GetChangeSetsAndUpdateWorkItems

 

  <Target Name="GetChangeSetsAndUpdateWorkItems" Condition="
'$(IsDesktopBuild)'!='true' ">

    <GenCheckinNotesUpdateWorkItems 

          TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

          BuildUri="$(BuildURI)"

          BuildNumber="$(BuildNumber)"

          CurrentLabel="$(BuildNumber)$(LabelQueryScope)"

          LastLabel="$(LastGoodBuildNumber)$(LabelQueryScope)"

          UpdateWorkItems="$(UpdateAssociatedWorkItems)"

          ContinueOnError="true" />

  </Target> 

 

>From memory, the only reason I'm overriding the TFS Label task is to
reduce it's scope - this was a problem in TFS 2005 - there was no other
way to tell it to  the label just to the required files and not the
entire project - hence all change sets in the entire project would be
reported.

 

Does anyone know if there's a new way to limit the label scope in TFS
2008?

 

Cheers

 

Matt

 

 

 

 

 

From: Matthew Hunter [mailto:[EMAIL PROTECTED] 
Sent: Friday, 11 April 2008 11:57 AM
To: [email protected]
Subject: [OzTFS] Build Upgrade from TFS 2005 to 2008 issues

 

Hi guys,

 

I've hit some snags upgrading our builds from TFS 2005 to TFS 2008. 

 

 I am having problems picking up the change sets and work items
associated with a build, it is not picking up the previous build label
correctly.

 

Problem #1

The first snag I hit was that the "label"  task had been changed (infact
the help online still doesn't seem to be up to date 
http://msdn2.microsoft.com/en-us/library/aa721747.aspx)

 

Originally I had the following to limit the label to the correct files
in my project:

 

<Target Name="CoreLabel" Condition=" '$(IsDesktopBuild)'!='true' "
DependsOnTargets="$(CoreLabelDependsOn)">

        <Label 

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

Workspace="$(WorkspaceName)" 

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

Version="W$(WorkspaceName)" 

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

Child="$(ChildLabel)" 

Comments="$(LabelTaskComment)" 

Recursive="true" />  

</Target>

 

I had to change it to this, to get it to work:

 

<Target Name="CoreLabel" Condition=" '$(IsDesktopBuild)'!='true' "
DependsOnTargets="$(CoreLabelDependsOn)">

<Label 

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

TeamFoundationServerURL="$(TeamFoundationServerURL)" 

Name="$(BuildNumber)" 

Version="W$(WorkspaceName)" 

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

Child="$(ChildLabel)" 

Comments="$(LabelTaskComment)" 

Recursive="true" />

</Target>

 

The changes made were to remove the "Workspace" element, add the
TeamFoundationServerURL and change the Name element.

 

Removing the "@$/$(TeamProject)/$(GetChangesetForFolder)" from the Name
element was necessary, because it was complaining with:

 

The label name '[EMAIL PROTECTED]/WorldOriginate/Source' is not
supported. It must be less than 64 characters, cannot end with a space
or period, and cannot contain any of the following characters:
"/:<>\|*?@

 

This seems to work fine, and the label is applied correctly when the
build succeeds.

 

Problem #2

The next thing to happen was the build worked successfully the first
time picking up all associated files/work items changes since the last
build, but the second and subsequent times I have run the build, not
work items are picked up.  Of course, out put from the build is coming
out correctly, but the it's just these associations that are missing
that is really annoying me.

 

This is probably because I am overriding the CoreLabel task, but I'm not
sure why it's happening exactly.

 

The message I am getting in the build log says:

 

Task "GenCheckinNotesUpdateWorkItems"

  GenCheckinNotesUpdateWorkItems
TeamFoundationServerUrl="http://colorado:8080/";
BuildUri="vstfs:///Build/Build/2203"
CurrentLabel="[EMAIL PROTECTED]/WorldOriginate" UpdateWorkItems=True
BuildNumber="WebSite_20080411.3" BuildUri="vstfs:///Build/Build/2203"

  Warning: Cannot find the last label '': no changesets will be
associated with the build.

 

In the only successful build after the upgrade to TFS 2008, it managed
to find this information, and the build log showed the following:

 

Task "GenCheckinNotesUpdateWorkItems"

  GenCheckinNotesUpdateWorkItems
TeamFoundationServerUrl="http://colorado:8080/";
BuildUri="vstfs:///Build/Build/2151"
CurrentLabel="[EMAIL PROTECTED]/WorldOriginate"
LastLabel="WebSite_20080311.1" UpdateWorkItems=True
BuildNumber="WebSite_20080404.7" BuildUri="vstfs:///Build/Build/2151"

  Analyzing labels WebSite_20080311.1 and
[EMAIL PROTECTED]/WorldOriginate.

  Querying item history.

 

Of course, I've had a look at "GenCheckinNotesUpdateWorkItems" task (
http://msdn2.microsoft.com/en-us/library/aa721749.aspx), but I'm not
sure where it gets the LastLabel from? 

 

I suspect removing the Removing the
"@$/$(TeamProject)/$(GetChangesetForFolder)" from the Name element is
the problem - but I can't figure out where this information should go
...

 

Also, anyone know where I can get the updated  "label task"
documentation for TFS 2008?

 

Any help would be greatly appreciated!!

 

Thanks

 

Matthew Hunter

 

________________________________

 

Matthew Hunter
Senior Developer
Stargate Group
Level 3, 600 Victoria Street
Richmond Victoria 3121

Telephone:

03 8420 3000

Facsimile:

        

  <http://www.stargategroup.com.au/> 

This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately if you have received this e-mail by mistake and delete this
e-mail from your system. No responsibility is assumed by the company or
its employee to any other person for any loss or damage (whether caused
by negligence or not) arising from the use of the information and advice
contained herein. Finally, it is your responsibility to check any
attachments for viruses and defects before opening or sending them on.

________________________________

OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net 

OzTFS.com - to unsubscribe from this list, send a message back to the
list with 'unsubscribe' as the subject. View the web archives at
http://www.mail-archive.com/[email protected]/
Powered by mailenable.com, supported by www.readify.net 




OzTFS.com - to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject. View the web archives at 
http://www.mail-archive.com/[email protected]/

Powered by mailenable.com, supported by www.readify.net

<<image001.gif>>

<<image002.jpg>>

Reply via email to