How to unlock an item locked by another user

It's inevitable... You're under a tight deadline to make a critical bug fix and someone else has the file you need to change locked.  You rush around and find someone with administrative rights to help out.  Here's what they do:

   h lock /lock:none $/OurTeamProject/WidgetProject/filewidgets.cs /workspace:joesdevbox

And voila!  You're back in business!  The /workspace parameter specifies the short name of the workspace the other user has the file checked out in.  If there are multiple workspaces with the same short name, you can qualify it by adding the user's domain\username.  For example:  /workspace:joesdevbox;CORPORATE\joelewis.  The full server path is required to specify the exact item you want to unlock.  A benefit of requiring the full server path is that the administrator doesn't even need to have a workspace with all the files sunc down just to unlock someone else's changes.

Currently, there's no way to do this through the GUI.  When you right-click on an item in the Source Control Explorer and choose "unlock", the action is issued against the current workspace selected in the workspaces listbox.

Comments (4)

  1. Abhinaba Basu on marking required fields in work items ⊕ and build types ⊕

    Adam Singer on the latest…

  2. 在 Team Foundation Version Control 中, 可以在簽出一個檔案修改時鎖定避免其他人同時簽出這個檔案, 但是問題來了, 萬一簽出而且鎖定檔案的人不在 (休假, 離職…), 而我們又急著要簽入這個檔案時怎麼辦?…

  3. posted on Thursday, June 23, 2005 11:43 AM by JasonBa : It's inevitable… You're under a tight

Skip to main content