Reputation: 1090
I have a question regarding Team Foundation Server 2013.
We would like to find out programmatically which label is assigned to the local version of a specific file or folder.
I have read through tf.exe documentation but I could not find out how to solve that...
Any response is highly appreciated.
Best regards
Upvotes: 1
Views: 1265
Reputation: 2840
A file can be associated with literally 100's of not 1000's of labels. By default when a build is run the version of the file being used for the build is given a label in the form of Lbuildnumber. If you had a file named anyfile.cs in your TFS workspace and that file had never been changed for the last 100 builds, that file would be associated with a label for each of the builds it had been a part of.
The tf.exe labels command provides the inverse of what you are looking for.
tf.exe labels LBVT_14191.3
would give you all the file versions associated with the build BVT_14191.3
tf.exe labels C14210
would give a list of all the file versions associated with changeset 14210.
I'm not aware of a tf or tfpt command that will do what you are asking. I every went directly at the SQL Server database TFS_Warehouse and couldn't find where label information is associated with items in the TFS repository.
Upvotes: 1