My boss was working with some excel and word files checked into the repository. He had template.xls locked as he was working in it, he decided to rename it to a template, so template.xlt it is (and checked in). After doing some more work, he decided this was a bad idea, so he changes it back to template.xls, and tries to check it back in again... no luck, it wont work.
15-20 minutes worth of investigation later, we found the problem. TortoiseSVN had been configured to always check "Keep Locks" on commit, hence the client kept the lock when he commited the template.xls deletion. To fix this problem, run svnadmin lslock and then svnadmin rmlock the file in question. Please note that this requires actual access to the physical subversion repository. Http or svnserve will not do in other words.
A step by step on how to cause the Dangling lock problem -- All of the actions are done via TortoiseSVN interface:
- Create a repository.
- Check out the repository.
- Add a file to the repository, set the svn:needs-lock property.
- Commit the file.
- Lock the file.
- Change name of the file, and check the "Keep locks" checkbutton.
- Commit the changes.
- Change the filename back to the original filename.
- Commit the change. This step will fail.