I've been browsing the Microsoft.TeamFoundation.Build.targets file and I followed the EndToEndInteration target as this is the one that gets run when Team Build does it's thing.
I have a question on the CoreGet target. This seems to get the latest source code for a workspace and then label the files with the BuildNumber. It's the labeling that I'm wondering about...
Does the label command take a look at each file in the workspace (i.e. the one on the local drive) and apply the new label on that version in SCC, or does it simple go through the latest versions in the specified branch on the server and apply the label
What I was concerned about was what would happen if: The CoreGet takes say 30 minutes to get all the latest source code. If when it started it got a file called A.cs at version 1 and then before the labelling happened someone decided to check in a new revision of that file so the latest version became version 2, what version of A.cs would get the label, version 1 because that is the version on the build machines local disk or version 2 because that was the latest version
Hope this makes sense!!
Regards
Graham

EndToEndIteration target
jheske
Version 1 will be labelled. The label task in CoreGet labels according to the "Workspace Version". The build process creates its own workspace and if anyone checks in a change, they would be using their own workspace. Thus the build process's workspace does not know about the new revision that has been checked in.
If you were to customize the build process however and check in the revision between the Get and the Label tasks in CoreGet, version 2 would be labelled as the workspace would now be aware of this change (as you are checking in using the build process's workspace now).
Hope this helps.