DCSIMG
Unlock files of other developers in TFS - SRL Group

SRL Group

This blog is about Team System, QA and Development methodologies and more...

VSTS Resources

Team System Bloggers

Unlock files of other developers in TFS

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?

  1. 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.
  2. 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

Comments

Team System News said:

J.D. Meier on Structuring Projects for Team Foundation Server. Buck Hodges on Channel 9 interview...

# March 15, 2007 4:07 PM

Eugene Zakhareyev said:

We have Status Sidekick to do the same thing without command line hassle; I'd assume command line would become a tad tiring if you were to unlock several files locked by several different users.

# March 20, 2007 7:36 AM

Warren said:

As luck would have it, our project name has a SPACE in it: $/TIP Scrum/Development/WebApp/

I have tried the ^ escape character for the space, but for the life of me i can't remember the escape character for a space.. The & escape is &amp, is there something similar in the commandline for VS?

# March 31, 2009 4:44 PM

CodeGrovellerVictim said:

I should at least be able to see who has what checked out by my team directly from Solution Explorer.  Instead I have to go look in some obscure place for some obscure command or otherwise go wake up some overworked machine admin to relegate yet more manual permissions to do nothing but tap my coworker on the shoulder to say - by the way you accidently checked out one of my files.

# May 5, 2009 12:49 AM

Robert said:

For Warren, just enclose the project name in double quotes "".

For Eugene, you can use the  asterisk "*" character after the filename's parent directory to make the changes to more than one item.

In the case that the project name has spaces AND you need to perform the command line operation on multiple files, just append the trailing double quote " with an asterisk.

I have had both issues and verified it works.

# June 11, 2009 11:18 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: