tags:

views:

5742

answers:

5

We currently are using both Visual Source Safe and Team Foundation Server at work (VSS for old projects, TFS for current or new projects).

We have always used Labels in source control for each build. In VSS if you chose to see a file history you could include labels. In TFS I cannot find an option to include the lables in the history window.

Since one of the most common questions that I get asked by support or management is 'What version did we fix/add/remove/change xxxx?', I have always relied on our build labels showing up in the history.

Can I get Labels to show up in a file history?

+7  A: 

In the current version of TFS, you don't see labels in the standard history of files and folders. If you really want to know why - see Brian Harry's blog post "Why TFS Labels are not like VSS Labels".

To find labels in Visual Studio, go to File, Source Control, Label, Find Label... From that you can see what versions of files were included in that label.

The team have definitely heard that this is not ideal, and the next version of TFS (Team Foundation Server 2010, codenamed "Rosario") will include improvements to the History view to make labels easier to find - see http://go.microsoft.com/?linkid=7807943 for the spec of improvements to the History view in TFS 2010.

BTW - I actually moved to changeset based build numbering with TFS which makes labelling less necessary. See http://www.woodwardweb.com/vsts/changeset_based.html for more details.

Hope that helps,

Martin.

Martin Woodward
I do know how to find the labels in Visual Studio but the Label --> file mapping is very much useless in the situation I described above.
Jack Bolding
I have read Brian Harry's post linked above and I can understand the lack of labels in a folder history but for a single file the label has to be before or after the file version. It should be possible to do this. But its not in the power toys either...
Jack Bolding
If lookup at the file level is sufficient, check out my answer.
Richard Berg
+2  A: 

This very issue has been killing us.

The best solution I've found is with the use of a third party tool called Team Foundation SideKicks available for free here http://www.attrice.info/cm/tfs/.

Under the "History Sidekick" there is a label tab. You can highlight any folder or file and it will show you every label that was dropped on that folder or file and at what changeset. Unfortunately you can not see a full view of a folder or file's history with labels included.

Under the "Label Sidekick" you can highlight any specific label at it can tell you what folders/files and changesets are in the label. This functionality is pretty much the same as what is available from within Visual Studio and is not as helpful.

One caveat is the need for a TFS server 2008 or above. Using the tool with TFS server 2005 is painfully slow and basically unusable.

-ephi

Ephi
+2  A: 

[due to the complexity of TFS-style labels this is a quite difficult problem when applied to folders; based on a comment above I'm going to assume searching for labels on a file is sufficient]

Unfortunately this is one of the very few edge cases of the TFS client API that is not exposed anywhere in tf.exe or VS2008. You'll have to call the API directly. Please see http://msdn.microsoft.com/en-us/library/bb138967.aspx - the "versionFilterItem" parameter does what you're looking for.

Richard Berg
+1  A: 

Good grief! Piping history between labels to a text-file is one of the most important thing to do when working with software!!

The responsible person for our software in my company, which is quite large, says NO to TFS just because of this!

Oh no.....and I llike TFS otherwise, but have been testing it out for him. But since I cannot demonstrate show history between labels, to a textfile....

He says NO. Arrrrgh.

kwik
A: 

I've used TFS branch history for this before. It's not the greatest UI in the world and only lets you show history per file but it gets the job done.

Ryan