Undo checkout or lock by another user
Scenario: Another user has locked a file for checkout, but is no longer available to check the file back in and now you need that file.
Unlocking the file
First you will need to get a list of the workspaces for that user. This can be done with administrative rights from the command line as follows:
tf workspaces /owner:DOMAIN\TheirUserAccount /computer:*
The command will retrieve a list of all workspaces on all computers for that user.
You can now use the output information to undo the checkouts on the files you want:
tf undo /workspace:TheirWorkspace;DOMAIN\TheirUserAccount $/path/to/file
In the event the developer is no longer with the company or on the project, you can also delete the workspace which will also undo any pending changes using the following command:
tf workspace /delete TheirWorkspace;DOMAIN\TheirUserAccount /s:https://TFSSERVER:8080
Comments
Anonymous
March 06, 2006
We've all been in the situation before when a developer goes away for a long weekend (usually leaving...Anonymous
November 07, 2006
I recently ran into the problem where I needed to rename some folders in source control of my team system...Anonymous
October 01, 2007
Het is mogelijk om de checkout van een file te undo'en (met genoeg rechten uiteraard) dit is handigAnonymous
May 12, 2009
Besides losing any code you may have written that you’ll never get back, those pending changes or locks