TF14082: Can not lock item message during a branch/merge

by joey.westcott 6. September 2008 19:45

This morning I was creating a branch in Team Foundation Server via VSTS, the branch name that I wanted to use was one that has been used before and is in fact still sitting around but is now old and out of date. So it being so out of date I just decided to delete the branch and then recreate if from the main branch of code.  After deleting the branch, I went to create the new branch and I get the message "TS14082: Can not lock item $/projectName/../filename.ext for merging. This item is checkout to another workspace".

tfs.cannot.lock.item 

At this point I have already deleted and committed the changed to the branch of code that I'm trying to recreate.  So being able to see what or even find who has files checked out was not an option, I was for the most part out of luck, well at least using the default tools that come in VSTS.  So I fired up the trusty Team Foundation SideKicks application and opened the Status Sidekick. This application allows you to search and view who has files checked out and what each of those files are (great tool, go get it). This tool allows you to filter based on username or even project name and then shows a nice tree view of all the files that are checked out and who has them checked out.

team.foundation.sidekick.status.screen

After gathering the details above I contacted each of the offending people who had items checked out in the old, now deleted branch, and asked them to "undo changes" to each of the files that were locked.  After all the files are no longer checked out or locked in any way, it allowed me to go ahead and recreate the branch using the same name.

What if you cant get a hold of those people or they cant undo the changes?
Lucky for you that the Team Foundation Sidekicks - Status Sidekick also supports undoing others pending changes. It accomplishes this by using the following command from the commandline:

tf undo $/path/to/file.txt /workspace:<WSname>;<domain\user>

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Development | Work

Comments

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen