Unlock files of other developers in TFS

14 במרץ 2007

4 תגובות

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

הוסף תגובה
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. שדות החובה מסומנים *

4 תגובות

  1. eugenez20 במרץ 2007 ב 7:36

    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.

  2. Warren31 במרץ 2009 ב 16:44

    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?

  3. CodeGrovellerVictim5 במאי 2009 ב 0:49

    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.

  4. Robert11 ביוני 2009 ב 23:18

    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.