Can I see TFS file history with labels?

前端 未结 6 1102
长情又很酷
长情又很酷 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: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
    

提交回复
热议问题