Today we need to undo check-out of other user, because one of our developers has to make modifications to a locked file, and the developer who locked the file isn't available to unlock it.
How locked/checked-out file can be unlocked by other user?
- The person which unlocks this file(s) has to be with appropriate permissions: Having the Unlock other user's changes permission set to Allow is required to remove a lock held by another user.
File or folder can be set to allow users or group to Unlock other user's changes and Undo other user's changes. A user that is granted these permissions can perform the unlock or undo.
- After we found a granted user (The project administrator in our case) we used the TF.exe with the Undo command from a Visual Studio command prompt.
tf undo "$/MyProject/VersionX/Utils/file.cs" /WORKSPACE:MaorDev;Domain\User /server:MyServerName /recursive
Excute the command and relax. Your developers can back to work!
More details about TF undo command you can find here: http://msdn2.microsoft.com/en-us/library/c72skhw4(VS.80).aspx and about TFS permissions here: http://msdn2.microsoft.com/en-us/library/ms252587(VS.80).aspx