TFS GUI for manipulating remote pending changes

In the last 6 months or so at work I have picked up the dubious honour of being the friendly TFS administrator. In that time we’ve migrated from one server to another (in different domains), and we’ve had a couple of people leave. This has meant there are often situations where an account that nobody can log in as anymore has some files locked, preventing a check-in or merge, or other such operation.

Normally, I would use the “tf undo” command at the Visual Studio Command Prompt to sort this out, but yesterday I ran into an odd situation where I could not see the pending changes via the tf command, even though I could see them in Visual Studio. Anyhow, I accidentally found a menu item that lets me find pending changes on any part of the source tree, and gives me the opportunity to undo other users’ checkouts on the server.

The “Find In Source Control” menu item can be found in “Source Control Explorer”.

Fire up Source Control Explorer, and select an item in the main pane. Right-click it and you’ll find the “Find in Source Control” item. This has to sub-items but they take you to the same dialog, with a different set of options ticked.

The “Find In Source Control” dialog, as shown when you select “Status” from the “Find In Source Control” menu.

After clicking “Find” you’ll be presented with the results of a source control query (much like searching through TFS, or comparing). You’ll notice up the top there’s a convenient “Undo” button.

Notice the handy “Undo” button.

This will make it a lot easier to undo orphaned changes for people.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.