Hi,
Is there is any way that we can store and retrieve the file names and it's respective version which went in to Specific executable build. I found that one way of doing it in TF is by using Labels associated during build process by Build server. But I find it has a potential problem , because Labels can be moved to new version or delete from a specific file version.
Clearcase has a powerful auditing functionality (Configuration record) which records all the files and respective revision went in to build and which can't be edited accidentally.Do we have similar functionality in Team System
Thanks In advance
Pramod

Build Information Record
Gravy
Thanks for the suggestions.
Once we label the files present in a workspace, we can find out changeset associated with a specific file using following command.
-- tf labels "<Label name>" /format:detailed
---Output---
Changeset Item
--------- ---------------------------------------------------------
118 $/BuidlTest/Hello World-Release 1.0 QA
118 $/BuidlTest/Hello World-Release 1.0 QA/helloworld
121 $/BuidlTest/Hello World-Release 1.0 QA/HelloWorld.cpp
Is there any other way where I can get similar information from command line with out labelling the files present in the workspace.
-Pramod
ReinerZ
bk13
If you decide to go with Patrick's suggestion, tf changeset /i /latest will give you the latest changeset for the repository.
It sounds like the key issue is the fact that labels can be modified. In v1, you can control whether someone is able to modify a label that person didn't create via the LabelOther permission (http://msdn2.microsoft.com/en-us/library/ms252587.aspx). If you can live with that level of control, labels would be the simplest way to go. If not, Patrick's approach or something along those lines would be what you would need to do.
Buck
mhawb
Thank you very much.
-Pramod
Andrew9141
I believe Changeset is the best way to identify the VersionSpec for files which went in to build.
Is there is any way that I can find out "base version specification" for a given workspace
darkkeeper
There isn't a "base version specification" for a workspace, since a workspace can have many disparate versions of files. What you would want to do for this is probably the following:
1. Get the latest changeset from version control
2. Sync the workspace using that changeset version specification
3. Store the changeset used to sync the workspace for the build somewhere
As Aaron stated in an earlier post, the label should work just fine. What build currently does is sync the workspace to latest and then label all versions of files in the workspace at the time of the build (which handles the many different versions of files in the workspace, since the version of each file is stored in the label). However, the changeset approach should work just as well, although as Luis pointed out it is not an out-of-the-box supported scenario.
Patrick
pyeung
What you need is a VersionSpec for the files that went into the build. You have a few options here, with the best one being the Label that Team Build applies to the files used in the build. This label will never be modified by Team Build directly, and by default has the same name as the build. If you can avoid modifying this label manually (which I wouldn't think would be a problem) you can use the label name to retrieve the appropriate versions of each file used in the build.
Another possibility would be to take a look at the Changesets associated with the build and use the latest changeset number as a changeset-based VersionSpec (see the documentation of tf.exe get for more info here: http://msdn2.microsoft.com/en-us/library/fx7sdeyf.aspx).
A final possibility would be to use the date and time at which the build was started for a date-based VersionSpec. I wouldn't recommend this option, however, since it is quite possible that additional changes snuck in after the time the build was started but before the Get portion of the build executed.
-Aaron
Jamie Thomson
Thanks for the information.
Combination of Label and Changeset will solve my problem.
Is there is any way that I can get the individual files/folders Changesets which are currently mapped to a workspace
-Pramod
lleoneye
d:\foo>tf properties foo.cs
Local information:
Local path : D:\foo\foo.cs
Server path: $/teamproject/foo/foo.cs
Changeset : 111108
Change : none
Type : file
Server information:
Server path : $/teamproject/foo/foo.cs
Changeset : 111108
Deletion ID : 0
Lock : none
Lock owner :
Last modified: Monday, August 14, 2006 7:18:31 PM
Type : file
File type : Windows-1252
Size : 6785
I believe the properties command will give you what you're looking for, although you will not be able to later retrieve this information. The strength of labels is that you can take a snapshot of the workspace as it existed at some point in time and retrieve it at a later date. However, if all you want is file information for your workspace then properties may be the command you're looking for.
You will want to pay special attention to the local item information in the output above. There you will find the version of a file that is in your workspace.
Patrick
popendot
You can perform a query against the server using the workspace as your version specification. This will show you all files/versions which are currently in the workspace.
An example for the command line to print all mapped items in the workspace would be:
tf dir /version:Wworkspacename;ownername $/ /r
You can also label all of the items in a workspace, which is what TeamBuild already does, by using the 'label' command for the tf.exe command line and passing it the same workspace version spec from above.
If you want the versions of each file in the workspace in code you could make a call to the OM method:
VersionControlServer.GetItems(String path, VersionSpec version, RecursionType recursion);
path = "$/"
version = WorkspaceVersionSpec (for the workspace in question)
recursion = RecursionType.Full
Hope this helps.
Patrick