1

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

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Rickson
  • 1,040
  • 2
  • 16
  • 40
  • possible duplicate of [Misunderstanding labels in TFS / VS 2010](http://stackoverflow.com/questions/7691988/misunderstanding-labels-in-tfs-vs-2010) – Edward Thomson Jul 04 '14 at 23:43

1 Answers1

1

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.

WiiBopp
  • 2,750
  • 1
  • 14
  • 9