TFS客户端QueryHistory - 获取最早的变更集

时间:2013-09-27 04:28:53

标签: c# .net-4.0 tfs2010 tfs-sdk

如何构造versionControlServer QueryHistory的参数以返回指定源位置的最早变更集?

或许,除了QueryHistory还有另一种方法吗?

1 个答案:

答案 0 :(得分:3)

查询返回1结果的路径中的所有更改,从最低变更集开始。 http://msdn.microsoft.com/en-us/library/ff736442(v=vs.100).aspx

versionControlService.QueryHistory(
            path, 
            VersionSpec.Latest,
            0,
            RecursionType.Full, //look into all subfolders
            null,
            null, //version from - first
            null, //version to - latest => all
            1, //Return at maximum 1 item
            boolIncludeChanges, // Include information on changes done
            false,
            boolIncludeDLInfo,
            true //sort ascending - C1, C2, .. CLatest
)