Wednesday, August 30, 2006 2:28 PMHi,
I am wondering if there is any command in the TFS API that lists all files in a folder, and shows whether they are checked out or not. I do know of the QueryPendingSets command, but I would have to combine that with a list of ALL files to get their state - checked in/out.
I saw this helpful post about listing checked out files:
Is there any API call that allows me to see this in one call?
P.S. For some reason, the 'Insert Hyperlink' button does not seem to work in FireFox.
Wednesday, August 30, 2006 6:42 PM
You need to use GetItems method of VersionControlServer class to retrieve items available (it has several overloads), and QueryPendingSets of VersionControlServer to view pending changes (if you do not want to do it for your workspace) or same method of Workspace class (if you want to view your current pending changes).
Hope that helps,
Wednesday, August 30, 2006 8:12 PMHi Eugene,
Thanks for the suggestions - I have already looked at the methods you suggested. The GetItems methods does not seem to have an overload that allows me to filter by the state of a file - checked out or not. It looks like I have to combine the two methods to get something work.
Buck's blog is something I go to quite often - found a lot of helpful information there.
Friday, September 01, 2006 12:16 PMModerator
Thanks, I'm glad you've found it to be useful.
If you are looking for the combination of GetItems() and QueryPendingSets(), then you most likely want the GetExtendedItems(). The only example posted that uses that (at least from what I can find) is http://blogs.msdn.com/buckh/archive/2006/04/06/project_diff.aspx. The GetExtendedItems() call is what the Source Control Explorer uses to populate the listview pane on the right (the tree on the left is populated using GetItems()).
Friday, September 01, 2006 7:30 PMThanks for the pointer. I'll give it a try.