Undo all changes in another user’s workspace

Recently, I migrated one of our in-house Team Foundation Server 2008 servers to Team Foundation Server 2010. After the migration, I noticed that there are several pending changes from a user that I need to remove. In this case, I need to use the tf undo command. If a team member is blocked from checking in a file that is locked by someone else, you can use the tf undo command to delete Team Foundation version control pending changes in another user’s workspace.

Required Permissions:
To undo pending changes in another user’s workspace, you must have the Administer workspaces permission set to Allow.

To undo all the changes in another user’s workspace, perform the following steps:

1.Click Start, click All Programs, click Microsoft Visual Studio 2010, point to Visual Studio Tools, and then click Visual Studio 10.0 Command Prompt.

2.Type the following command at the command prompt and replace the arguments with the appropriate parameter information for your needs:

tf undo /workspace:YourOtherUserWorkspace;YourOtherUser /recursive “$/YourTeamProject” /s:http://YourTeamFoundationServerComputer:8080/tfs

Example Output:

C:\Program Files\Microsoft Visual Studio 10.0\VC>tf undo /workspace:WIN-GS9GMUJITS8;aprist /s:http://win-gs9gmujits8:8080/tfs /recursive “$/Tailspin Toys”
The operation completed successfully.  Because you do not have Use permission on the workspace WIN-GS9GMUJITS8;aprist, you must perform a separate get operation in that workspace to update it with the changes that have been made on the server.


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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s

%d bloggers like this: