2014-12-04 102 views
0

我使用VS 2012,Microsoft.TeamFoundation.Client.dll 11.0(TFS API)和服务器TFS 2008在TFS API(TFS 2008,VS 2012)中获取分支和合并历史记录

我已创建分公司

int changesetId = vcServer.CreateBranch(sourcePath, targetPath, VersionSpec.Latest); 
Changeset changeset = vcServer.GetChangeset(changesetId); 
      changeset.Comment = comment; 
      changeset.Update(); 

我可以变更集列表

 var ChangesetList = vcServer.QueryHistory(targetPath, 
       VersionSpec.Latest, 0, RecursionType.Full, "", versionFrom, VersionSpec.Latest, 
       Int32.MaxValue, 
       true, // the boolean "include changes" is taking the time... If you do not include the changes and only the metadata of the changesets the query is very fast 
       false).Cast<Changeset>(); 

我可以做结帐和签入关于分公司的文件,然后执行合并。

我很困惑如何获取关于分支机构历史(GetBranchHistory)的好信息,合并历史记录(可能是QueryMergesWithDetails),以及与QueryPendingSets的差异。

回答

1

我觉得老了,老的博客文章由罗伯特可以帮助你 http://blogs.msdn.com/b/roberthorvick/archive/2006/02/04/524960.aspx 如果没记错,我们在2010年加入TFS更好的API,支持更强大的注释和分支可视化。 至于QueryPendingSets,它与分支历史记录无关。它为您提供了可能的服务器上未决更改集。你也可以尝试Workspace.GetPendingChanges,但我需要知道具体的帮助:)