Can I see TFS file history with labels?

前端 未结 6 1081
长情又很酷
长情又很酷 2020-12-28 13:51

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

相关标签:
6条回答
  • 2020-12-28 14:01

    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.

    0 讨论(0)
  • 2020-12-28 14:07

    In the 2008 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.

    0 讨论(0)
  • 2020-12-28 14:10

    [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.

    0 讨论(0)
  • 2020-12-28 14:17

    TFS 2010 has a very useful "Labels" view (rather than "Changesets") in the history of any branch. Unfortunately, it only shows labels in the branch you have chosen, rather than labels in all child branches/folders.

    0 讨论(0)
  • 2020-12-28 14:17

    I started to play with trying to create my own SQL to do this and run it directly against the TFS database(s) themselves. This SQL was run against TFS 2008. This little snippet will show ALL the labels and changesets for ALL the branches ordered with the most recently created branch/modified label first. The next step in developing this would be to somehow traverse the changesets and the labels to only bring back areas I'm interested in (like 'Main' or some particluar branch). I imagine if I created SQL that would do all of this, it would be dog slow, and wouldn't have the full GUI I want to dive into the history for a particular file, see labels with that, etc. Sigh.

    select DisplayName, cs.CreationDate, Comment, 'CheckIn' 
    from TfsVersionControl.dbo.tbl_Identity i, TfsVersionControl.dbo.tbl_ChangeSet cs 
    where cs.ownerid = i.IdentityId
    union
    select DisplayName, LastModified, Comment, 'Label' 
    from TfsVersionControl.dbo.tbl_Identity i, TfsVersionControl.dbo.tbl_Label l 
    where l.ownerid = i.IdentityId
    order by 2 desc
    
    0 讨论(0)
  • 2020-12-28 14:22

    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

    0 讨论(0)
提交回复
热议问题