将 TFS 2010 历史记录导出到 Excel 或文本文档 [英] Export TFS 2010 History to Excel or Text Document

查看:33
本文介绍了将 TFS 2010 历史记录导出到 Excel 或文本文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 TFS 2010 导出包括用户、日期和完整评论(未截断)的历史记录?

How do you export history from TFS 2010 that includes the user, date and the complete comment (not truncated)?

例如,在团队资源管理器中:右键单击团队成员姓名 > 显示签到历史记录.这将显示用户的签到历史记录,但评论将被截断.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆