具有特定变更集的所有文件和版本号的 TFS 列表 [英] TFS Listing of all files and version numbers with a particular changeset
问题描述
我是 TFS 的新手,需要编写 TSQL 查询以获取包含在特定变更集版本号中的所有文件和版本号的列表.在网上搜索表格以获取此信息时,我发现有些人提到使用 Tfs_Warehouse
数据库,而其他人提到使用 Tfs_DefaultCollection
数据库.我有以下问题:
I'm new to TFS and needing to write a TSQL query to get a listing of all files and version numbers that were included in a particular changeset version number. While searching online for the tables to get this information I found some people mentioning to use the Tfs_Warehouse
database and others that used the Tfs_DefaultCollection
database. I have the following questions:
- 这两个数据库有什么区别?
- 为什么要使用一种而不是另一种?
- 您使用哪些表来获取特定变更集的文件/版本信息?
推荐答案
您可以使用 VersionControlServer.GetChangeset() 方法来自 TFS 对象模型.
You can use the VersionControlServer.GetChangeset() method from the TFS Object Model.
您需要在 GAC 中添加对以下程序集的引用:
You will need to add references to the following assemblies in the GAC:
- Microsoft.TeamFoundation.Common
- Microsoft.TeamFoundation.Client
Microsoft.TeamFoundation.VersionControl.Client
- Microsoft.TeamFoundation.Common
- Microsoft.TeamFoundation.Client
Microsoft.TeamFoundation.VersionControl.Client
Private Shared Sub Main(ByVal args As String())
Dim tfs As TfsTeamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(New Uri("http://tfsserver:8080/tfs/CollectionName"), New UICredentialsProvider)
tfs.Connect(ConnectOptions.None)
Dim vcs As VersionControlServer = tfs.GetService(Of VersionControlServer)
Dim changeset As Changeset = vcs.GetChangeset(changeset ID, True, False)
End Sub
然后您可以检查 .Changes 属性以查看变更集中包含的所有更改.
Then you can inspect the .Changes property to see all the changes included in the Changeset.
这篇关于具有特定变更集的所有文件和版本号的 TFS 列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!