What do you do if the file in TFS is locked by someone else?

后端 未结 11 815
梦如初夏
梦如初夏 2020-12-23 13:35

Someone left the organisation but before leaving, he locked all the files for an unknown reason.

How do you unlock them all so that the other developers can work?

相关标签:
11条回答
  • 2020-12-23 13:43

    I needed to add /collection:collectionURL otherwise the workspace could not be found:

    • List item

    tf loc /lock:none /workspace:WorkspaceName;UserName /collection:collectionURL

    0 讨论(0)
  • 2020-12-23 13:48

    first you need to have the right to do this. If you have that the easiest is to use TFS sidekicks from attrice http://www.attrice.info/cm/tfs/

    0 讨论(0)
  • 2020-12-23 13:57

    Sometimes this is masking an different problem with a completely different application is locked by another user, but you cannot even create a New Folder for the new project you wish to merge into ( target won't allow the creation and incorrectly stating that someone has a file locked in their name) but then you dig deeper and another project is the culprit.

    So a completely different project can be the problem with it having files locked by someone else.

    0 讨论(0)
  • 2020-12-23 14:01

    Here's an explanation of using TFS permissions.

    Having the "Unlock other user's changes" permission set to Allow is required to remove a lock held by another user.

    0 讨论(0)
  • 2020-12-23 14:02

    If the developer has left the organization, then the best thing to do is to delete their workspaces. This will unlock the files for you but also free up some resources on the server.

    See the following blog post I did on the topic when it happened to me a few years ago.

    http://www.woodwardweb.com/vsts/unlocking_files.html

    You can either delete the workspace using the command line (tf.exe) or you can use the excellent TFS Sidekicks from Attrice.

    0 讨论(0)
  • 2020-12-23 14:02

    Have a system administrator reset that users password, log on as that user, unlock all files...

    I would think this is the solution to almost all 'someone who is no longer at this organization' questions...

    0 讨论(0)
提交回复
热议问题