Undo all changes in another user’s workspace
December 8, 2011 Leave a comment
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.
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
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.