TFS: Undoing a checkout that belongs to another user – via TFS Version Control and more
Posted by jpluimers on 2010/07/01
I recently needed to undo a TFS checkout from a user on another workspace.
This particular user had an exclusive lock on the document, was scheduled to be away for considerable time, and I was supposed to finalize that document.
I know that performing the undo is not possible from the Visual Studio UI: you need use the TF command-line application for this kind of work.
Fiddling on my own with the TF undo syntax didn’t get me the results right away, so I was glad to find this “Undoing a checkout that belongs to another user” post by mrod (Mario Rodriguez) from Microsoft.
The trick was to include the bold part:
tf undo /workspace:OtherUserWorkspace;OtherUser $/Project/ItemName.cs /s:http://yourtfsserver:8080
You have to be TFS admin to do this.
Since I was on the same TFS server, I did not have to include the /s: part.
Another project finished :)
–jeroen
Team Foundation Server (TFS) 2010 Upgrade & Implementation | Anthony Rideout said
[…] to Override/Undo a Check Out (TFS Power Tools, “Find In Source Control”): https://wiert.wordpress.com/2010/07/01/tfs-undoing-a-checkout-that-belongs-to-another-user-via-tfs-ve… LD_AddCustomAttr("AdOpt", "1"); LD_AddCustomAttr("Origin", "other"); […]
Anthony Monsees said
This can also be accomplished within Visual Studio if you have the TFS power tools installed. You have to do a “Find in Source Control” to list all the checked out files and then right click and select undo.
-Anthony
jpluimers said
Thanks for the tip!