TFS List of all files and version numbers with a specific set of changes.

I am new to TFS and I need to write a TSQL query to get a list of all the files and version numbers that were included in the specific version number of the change set. When searching the Internet for tables to get this information, I found that some people mention that they use the Tfs_Warehouse database and others that used the Tfs_DefaultCollection database. I have the following questions:

  • What is the difference between two databases?
  • Why would you use one instead of the other?
  • What tables do you use to get file / version information for a specific set of changes?
+7
source share
3 answers

You can use the VersionControlServer.GetChangeset () method from the TFS object model.

You will need to add links to the following assemblies in the GAC:

  • 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 

You can then check the .Changes property to see all the changes made to the changeset.

+2
source

If you want to get this data from a SQL Server database, here is a query:

 SELECT chg_set.CreationDate, chg_set.ChangeSetId, v.FullPath FROM dbo.tbl_ChangeSet (nolock)AS chg_set INNER JOIN dbo.tbl_Version (nolock)AS v ON chg_set.ChangeSetId = v.VersionFrom LEFT OUTER JOIN dbo.tbl_File (nolock) AS f ON v.FileId = f.FileId WHERE (chg_set.ChangeSetId = [Your changeset ID]) ORDER BY chg_set.CreationDate, v.FullPath 

Source: http://www.isosoft.org/taoffi/post/2012/05/22/TFS-database-pause-Change-set-quantitative-statistics-sample.aspx

+9
source

Does tf.exe changeset information you want? He had many options ...

0
source

All Articles