Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Folder' already locked by 'Folder'

Tags:

I have this very VERY annoying issue where I'm attempting to merge our trunk into my branch for some updates. I have been doing this on a daily basis but almost every single day I get the following error:

Error - 'D:\Code\Website' is already locked via 'D:\Code\Website'. 

Only very randomly does this error not happen and I am able to successfully merge trunk back into the branch. However, all day I've been trying to get the latest from the trunk without success. I have looked high and low for answers to this issue.. SO, Google, random forums on the internet... etc. I'm hoping someone can shed some light on why this might be happening.

This is what I've already tried:

  • Run "Clean up" on every single folder within the directory.
  • Checked for "lock" file in .svn directory - doesn't exist.
  • Opened wc.db file and checked WC_LOCK table - nothing in there.
  • Disabled anti-virus.
  • Disabled IIS.
  • Checked out a fresh copy of the branch.
  • Updated TortoiseSVN
  • Completed uninstalled and re-installed TortoiseSVN with latest MSI from TortoiseSVN.net (1.7.10.23359, SVN 1.7.7).

I am able to Update the branch and Commit it.. there has never been an issue with that. It's just Merging trunk back in that is causing me issues. No one else on the team seems to have this problem (with this branch, or any others). They can freely check the branch out.. merge trunk in and commit it without issues.

I am using TortoiseSVN. Any help you guys/gals have would be fantastic!

EDIT: Also, a Test Merge works.. but an actual Merge doesn't.

UPDATE

It turns out TSVNCache.exe CONSTANTLY holds locks on the wc.db file. I have no idea why. Even if I kill the process; once I go through the TSVN Merge GUI it fires up the cache again and locks it. I have managed to successfully merge via the command line.. is there any way to fix the cache locking issue to avoid having to rely on the command line?

like image 800
Simon Whitehead Avatar asked Nov 08 '12 00:11

Simon Whitehead


1 Answers

Try turning off the icon overlay status cache (What the TSVNcache.exe process is responsible for)

  1. Open an Explorer Window
  2. Right click anywhere, TortoiseSVN -> Settings
  3. Go to the "Icon Overlays" section
  4. Select the "None" radio button under Status Cache
  5. Click Apply

Presumably if the status cache is disabled and TSVNcache.exe isn't running, then it can't lock any files. You can at least rule out whether this is the problem (it sure sounds like it is). This is the process that's responsible for updating the folder/file icons in Explorer with that green checkmark, red modified mark, and so forth. I've disabled this for performance reasons for years. I just view modified files or open a commit dialog to see what files have changed.

After that, the next most likely suspect is the Indexing service (Windows Search) from past experience.

like image 60
Joshua McKinnon Avatar answered Sep 25 '22 23:09

Joshua McKinnon