开发者

TFS utility or direct SQL

I would like to get the count of TFS files checked in for a given date range. I would like this data to include the count(of check-ins) and group by [TFS file name] and [TFS work item type]. I have seen some direct queries to the TFS database, but they don't seem to work with TFS 2010.

Any TFS 2010 gurus out there who can provide a sql query, or point me to a preferably open source ut开发者_Go百科ility that does this?


The second time today I came across a question related to this powerful query of VersionControlServer: QueryHistory :)

public IEnumerable QueryHistory(
    string path,
    VersionSpec version,
    int deletionId,
    RecursionType recursion,
    string user,
    VersionSpec versionFrom,
    VersionSpec versionTo,
    int maxCount,
    bool includeChanges,
    bool slotMode,
    bool includeDownloadInfo,
    bool sortAscending
)

I'm not sure if there's already such a utility, but you can write up some quick code to perform exactly what you want using the above query.

For a specific path, which could be a directory and everything under it if the recursive flag is true, this query will give you a list of changesets that occurred between two versions (these versions can be dates).

A changeset is a unit of checkin. A changeset contains a list of files and a list of work items that were associated with it. Now you have enough information to count the number of files, the number of checkins, and group the results by file and/or work item type.

If you are new to using the TFS APIs (aka TFS Object Model), let me know and I can probably post up some pointers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜