title: TFS claiming files are locked even though they are not - Orphaned Locks
body: <p>I'm trying to perform a baseless merge between two branches using tf.exe.</p>
  <p>When I run the command, it fails and tells me that there 15-20 files that are locked by another user.  I've looked at the other user's pending changes and he only has three files checked out in the target branch and none of them are locked.</p>
  <p>Has anyone experienced something similar to this before?</p>
  <p><strong>Edit</strong></p>
  <p>With help from Robaticus, I've found that the locks are in the tbl_lock table, but the pending changes they are associated with do not exist any more.  It looks like there are multiple orphaned locks other than the ones that are giving us the current merge issue.</p>
  <p>Does anyone know what causes these or a way of fixing them that does not involved touching the DB directly?  I'm off to do a little research to see if I can find anything.</p>
  <p><strong>Edit 2</strong></p>
  <p>First Google search for 'tfs orphaned locks' returns this: <a href="https://docs.microsoft.com/en-us/archive/blogs/chandrur/orphaned-locks-in-tfs" rel="nofollow noreferrer">Orphaned locks in TFS</a></p>
  <p>The TFS team recommends deleting them directly from the table, so I guess I'll have to do that.</p>
  <p>I didn't see any posts indicating that it had been fixed yet.</p>