4

I am trying to delete a folder within my Subversion repository. My TortoiseSVN client gives me the following error message when I try to commit this change:

Commit Failed (details follow):

User {username} does not own lock on {path}

page {filename} currently locked by {another user}

If you want to break the lock, use the 'Check for modifications' dialog.

I do want to break the lock and delete the folder, but I can't see an obvious way to do it from the Check for Modifications folder. Does anyone have any suggestions?

Community
  • 1
  • 1
dthrasher
  • 40,656
  • 34
  • 113
  • 139

2 Answers2

12

From Pedro's answer, I was able to figure out how to do this from within Tortoise SVN. You can find the full instructions in this tread on the SVN Forum: http://www.svnforum.org/threads/39826-Commit-problem-User-does-not-own-lock-on-path

The short version is:

  1. Open the Check for Modifications dialog
  2. Click the Check Repository button
  3. You should now see the name of the user that holds the lock in the Lock column (you may need to scroll right to see this column in your list.)
  4. Right click on the file with the lock. You should now see the Break Lock option on the context menu.

If you have a lot of files, you can select all files in your list (Ctrl-A) and apply the Break Lock for everything, as described here: How can I release locks in Subversion recursively?

Community
  • 1
  • 1
dthrasher
  • 40,656
  • 34
  • 113
  • 139
  • +1 for this, as an alternative you can ask user who holds the lock to unlock and then try committing your changes. – user3584056 Jul 09 '14 at 07:45
  • in my case, the user who lock these files has been release the lock, but it still show this error when I commit files. – frank Jul 27 '21 at 03:32
2

An administrator can break the lock. See "Breaking and Stealing Locks" from this page.

Pedro
  • 12,032
  • 4
  • 32
  • 45
  • That's good background on how locks work in Subversion. The command line snippets in the article should do the trick, but I bet there's a way to do it from within Tortoise as well. – dthrasher Sep 24 '11 at 18:41