TFS: Getting all Checked Out files via TF.exe 

Edit 13 may 2009 : There is another good alternative. One of my friendly colleagues pointed out  to me you can also install the latest TFS  Power Tools (October 2008).

You will then have a nice UI  with some new features. Some of those features are:
1) “Find in Source Control Explorer”.
It’s possible to show the current checkout status in any folder in Source Control Explorer.
2) A new “Team Member” node in Team Explorer.
For each member you can see for example the “check-in history” or “Pending changes”.

------------------------------------------------------------------------------------------------------------------

When you are working with Team Foundation Server (TFS), sometimes you require an overview of all Checked Out files. For example, you want to be sure your colleague can go on holiday after he/she finished his/her work with a mandatory check-in.

I was unable to see all Checked Out files by any user with Team Explorer, so I started looking at the command line tool TF.exe. After that, it was really simple to get an overview.  You can even integrated the command line tool in Visual Studio. You just add a new "External Tool".

 

First, the TF.exe command line tool:

The location of the command line tool:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe

To change/add a local workspace:
tf.exe workspace

All checked out files in $/FavoriteProject:
tf.exe status $/FavoriteProject /user:* /recursive

All files checked out to Tim:
tf.exe status /user:Tim

All checked out files in $/FavoriteProject using Login Credentials:
tf.exe status $/FavoriteProject /user:* /recursive /login:yourDomain\tim,yourdomainpassword

------------------------------------------------------------------------------------------------------------------

Second, a  short walk-through to use the tf.exe command in Visual Studio IDE.

  • - Select from the menu: "Tools / External Tools ..."
  • - In the "External Tools" dialog, click the "Add" button.
  • - Enter a title that will show up in the Tools menu (ie. "Show FavoriteProject Checkouts")
  • - Enter "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\tf.exe" for the command
  • - Enter "status $/FavoriteProject /user:* /recursive for the arguments.
  • - Make sure that the "Use Output Window" check-box is checked.
  • - Make sure that the "Prompt for Arguments" check box is checked. (Optional, if you want to use login-credentials)
  • - Click OK to save.
  • - You can now execute the tool from the menu. The output will be shown in the output window.

example_tf

Posted on 12-05-2009 by Tim van der Weijde
0 Comments  |  Trackback Url  |  Link to this post
Tags: Visual Studio

Links to this post

Comments

Name:
URL:
Email:
Comments:

CAPTCHA Image Validation