Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS query (in Visual Studio) to get all check-ins

I'm trying to get a list of all check-ins (limited / ordered by date) via the TFS query editor in Visual Studio Team Explorer.

I can make a query that lists all bugs, sprint backlog item or product backlog item, but I can't find the actual check-in. Is it's possible or should I make (SQL) queries directly on the database.

Ideas?

like image 891
Ola Avatar asked May 07 '09 11:05

Ola


2 Answers

Just open the Team Explorer window, expand the TFS project, and double-click the Source Control node there.

Then you can simply right-click a project or directory in TFS source control and select View History, then you'll get all the commits.

like image 132
Lasse V. Karlsen Avatar answered Sep 22 '22 16:09

Lasse V. Karlsen


The tf command-line utility (available via VS2010 Command Prompt) provides a way to retrieve the history of all checkins for a specified file or folder.

Specifically, the tf history command allows for filtering by date range. For example, to get all of the checkins for the current month of June (i.e. 6/1/11 - 6/30/11), then use the \version parameter with the date option (D"[start date]"~"[end date]"):

tf history c:\MyProject /recursive /version:D"06/1/11"~D"06/30/11" 

This will launch an interactive GUI window showing all checkins that occurred between those dates. The GUI window is equivalent to the history windows shown in Visual Studio. Therefore, you can drill down to view changeset details, compare to files to previous versions, etc.

If you simply want to view the history list without the GUI window then add the parameter /noprompt:

tf history c:\MyProject /recursive /version:D"06/1/11"~D"06/30/11" /noprompt 

This will output the results to the command prompt console window.

like image 28
Ray Avatar answered Sep 20 '22 16:09

Ray