When I posted my Vista rant a few weeks back, I listed "Mysterious file locking" as one of my gripes. However, a recent discovery has lead to believe that the blame for this issue may not rest solely on Vista. In the interest of full disclosure, I should admit that I'm back on Vista (64-bit no less - ouch) for a variety of reasons that I won't go into. Let's just say that I figured every operating system deserves a second chance, and fortunately KB938194 and KB938979 have made the daily grind a little less painful.
Does the following scenario sound familiar? You try to delete a folder, but receive a prompt telling you that "access is denied." Setting security permission and taking ownership of the folder does not help. However, if you delete everything inside it the folder first, you can remove it without problem. With a little help from handle.exe, I discovered that in my case the source of the problem was actually TortoiseSVN, or more specifically TSVNCache.exe, which retaining handles on these folders that I was unable to delete.
By default, TortoiseSVN will attempt to monitor the status of all directories on all drives, adjusting file and folder icons to reflect that current state of versioned files and folders. However, if you attempt to keep any order to your development projects (or even if you don't) the actual paths on your machine that need to be monitored represent only a subset of the overall directory. This means TortoiseSVN is spending a lot of effort (and disk I/O) watching irrelevant directories. Fortunately, there's a simple way to control this which directories TortoiseSVN will monitor. From the TortoiseSVN help file:
"TSVNCache.exe also uses these paths to restrict its scanning. If you want it to look only in particular folders, disable all drive types and include only the folders you specifically want to be scanned."
To make this adjustment, simply open up your TortoiseSVN settings (right click on any folder and select TortoiseSVN > Settings) and select Look and Feel > Icon Overlays.
Your settings will probably look like the following:
To restrict the monitored paths, uncheck Fixed drives and then use the Exclude paths and Include paths values to narrow the scanning. If the specified directories should be acted on recursively, make sure you add a * to the end of the path.
Sure enough, once I made this change, the folder locking problem disappeared. Hooray for small victories!
Escape from Hotfix Hell
If you ever had to get a hotfix from Microsoft PSS, you know what a time consuming process it can be. You can spend upwards of half an hour on hold before reaching a screener, and subsequently an engineer, both of whom you'll need to convince that you are indeed to experiencing the problem that the hotfix addresses. So needless to say, I was thrilled when I discovered the following page this morning:
Hotfix Request Web Submission Form
Kudos to Microsoft for finally making it easier to get hotfixes!