TFS: Find Files Affected Between Changesets

前端 未结 4 1821
余生分开走
余生分开走 2021-01-17 12:19

We are using Team Foundation Server 2012.

We had a guy submit 97 files (not counting the designer and resource files) in Changeset 13646 on 8/9/2016.

Ten (10

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 12:47

    There is also a way to do this with a SQL query using the Relational data warehouse. You will need access to the tfs_warehouse database for this. There are a few dimension tables you must join to get what you need:

    • dbo.WorkItem
    • dbo.WorkItemChangeset
    • dbo.ChangeSet
    • dbo.CodeChurn
    • dbo.File

    You can use dbo.WorkItemChangeset for the link between changesets and work items and dbo.CodeChurn for the link between changesets and files.

    The documentation on this is old and incomplete, but here are some links that explain the fact and dimension tables:

    • Understanding the Data Warehouse Architecture
    • relational schemas
    • work items schema
    • source control schema

    Note that their is only one Tfs_Warehouse database so the information of all projects in all project collections is stored here. Therefore you cannot trust changeset or work items ID's to be unique. These values are unique within a single project collection so in the Tfs_Warehouse the combination of project collection and changeset or workitem ID is unique.

    Unfortunately I do not have access to a Tfs_Warehouse database at the moment so I'm unable to provide you with the exact query. But this question has a similar query you could modify.

提交回复
热议问题