2

We are using TFS 2010. A guy has left the organization and his member user is deleted from TFS team members. Now there are files that are locked on him. Using TFS Team Explorer 2010 GUI, we can right-click on a team member and undo any file that's checked out and locked. But how to do the same for the team member which is now no more a part of TFS i.e. how to undo pending changes and locks on files done by a TFS member which is now deleted from the TFS team members? If anyone has faced a similar problem, please help, because of this reason we are not able to merge from one branch to the other.

I have also tried tf lock /lock:none /workspace:< workspace name >; < username > /recursive $/

I am currently part of the TFS Project Administrators group but still can not use this command. I get TF30063 error. Any help or pointer is appreciated.

weegee
  • 3,256
  • 2
  • 18
  • 32
Vikrant
  • 253
  • 4
  • 15
  • hey, have you figure it out? I'll be glad if you found the solution... – Muzzy B. Aug 20 '14 at 11:08
  • solved the issue! you have to have Admin right and vola! you can unlock the lock... – Muzzy B. Aug 20 '14 at 14:24
  • Unfortunately, we've decommissioned TFS and have migrated to svn, I can't try out any of the solutions provided here because we no longer have TFS installed. But it's great that you solved the issue ! Kudos ! – Vikrant Aug 21 '14 at 05:07
  • alright! but keep in your mind! in any case, if you have ever come across any problem related this kind of issue in TFS, rocky's solution works like a charm! thanks by the way! – Muzzy B. Aug 25 '14 at 08:06

3 Answers3

4

Use TFS Sidekicks - Status sidekick. Find the file you want to unlock, click on that specific file and then click Undo.

rocky
  • 7,506
  • 3
  • 33
  • 48
  • hey does it really work? I installed a standalone package of Version 2.4 of TFS sidekick. When I searched any locked file, then I can see locked and checkout file of a deleted user. When I clicked undo pending change or unlock lock buttons, there is no change after all. The status of a file does not change. Can you guide me that if I have to do any extra process for it? – Muzzy B. Aug 20 '14 at 11:06
  • thanks for the solution, rocky! I didn't have admin right, after a colleague has logged in to TFS Server as admin, we easily unlocked the lock of a deleted user. – Muzzy B. Aug 20 '14 at 14:26
2

Just install tfs power tools and then from the team explorer go to the Team Project for which code or other files are being checked out for an ex-user. Then right-click on the Team Project from source control explorer. From the context menu select the option "Find in source Control" and click on status option. A small window will get opened. Chose the option "Display all checked out" or chose the option "Display files checked out to :" in the input box provide the full user name of the ex-user like domainname\username and click find. From the result screen undo the files checked out by the specific user.

atjoedonahue
  • 476
  • 6
  • 19
1

TF LOCK "full fileToUnlock path" /LOCK:NONE /workspace:"the workSpaceName";"username"

e.g

TF LOCK c:\tfs\ngcs_main\Development/XX.* /LOCK:NONE /workspace:development;jeremykk

you run it from: "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\"

aura
  • 116
  • 1
  • 2
  • 16