How do I figure out which changeset a label in TFS was applied to?

Lasse V. Karlsen picture Lasse V. Karlsen · Feb 13, 2009 · Viewed 11.2k times · Source

We're using Team Foundation Server and we are using Labels to create points in our version history where specific versions (either internal or external) were produced.

Right now we were wondering if a particular changeset was done before or after a specific label (and thus included in that version or not), but we must be looking in the wrong place. This information is usually provided in the bug-tracking system but this time this field was left open so we thought we could use TFS to figure it out.

The version history for a file doesn't include labels applied. To find labels, the place I know to look is to use the "Get Specific Version" dialog, set type to Label and use the Label selection dialog to see which labels we've made, but this dialog doesn't tell me the changeset before/after the label was applied.

Is the only way to figure out if a particular change was part of that release or not to create a new workspace, map up the directory with the files to a temporary directory on disk, use the Get Specific Version dialog to extract that release and do a file-diff?

Please tell me how stupid I am and point me in the right direction.

Answer

Brian Low picture Brian Low · Dec 12, 2012

Run in your local workspace

tf history . /stopafter:1 /noprompt /r /version:Lmylabel

to get

Changeset User          Date       Comment
--------- ------------- ---------- --------------------------------------------
88888     brian_low     11/11/2012 did some work