将TFS 2010历史记录导出到Excel或文本文档 [英] Export TFS 2010 History to Excel or Text Document
问题描述
如何从TFS 2010中导出包含用户,日期和完整注释(未截断)的历史记录?
How do you export history from TFS 2010 that includes the user, date and the complete comment (not truncated)?
例如,在Team Explorer中:点击团队成员名称>显示签到历史记录。这将提示用户的入住历史记录,但是这些注释被截断。
For example, in Team Explorer: right-click team member name > show check-in history. This will bring up the user's check-in history, but the comments are truncated.
推荐答案
最简单的方法是连接到来自excel的TFSWharehouse,然后从excel表中的源代码控制历史记录中提取数据。这是非常简单和非常强大的。
The easiest way is to connect to the TFSWharehouse from excel, then pull the data from the source control history in a excel sheet. This is really simple and very powerful.
您可以在这里找到有用的信息: http://www.woodwardweb.com/vsts/getting_started.html
You'll find useful info here: http://www.woodwardweb.com/vsts/getting_started.html
编辑:
当您无法访问SSAS(例如tfspreview.com)时,使用TFS API枚举更改集:
Using the TFS API to enumerate the changesets when you don't have access to SSAS (e.g. tfspreview.com for instance):
TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, true);
tpp.ShowDialog();
var tpc = tpp.SelectedTeamProjectCollection;
VersionControlServer versionControl = tpc.GetService<VersionControlServer>();
var tp = versionControl.GetTeamProject("MyTeamProject");
var path = tp.ServerItem;
var q = versionControl.QueryHistory(path, VersionSpec.Latest, 0, RecursionType.Full, null, new ChangesetVersionSpec(1), VersionSpec.Latest, Int32.MaxValue, false, true, false, false);
foreach (Changeset cs in q)
{
var user = cs.Owner;
var comment = cs.Comment;
var date = cs.CreationDate;
Debug.WriteLine(string.Format("[{3}] Date: {0}, User: {1}, Comment {2}", date, user, comment, cs.ChangesetId));
}
这篇关于将TFS 2010历史记录导出到Excel或文本文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!