On Mon, Oct 31, 2011 at 9:22 AM, Robert Kochem <robert@...> wrote:
> I am using TortoiseHG 2.1.3 on Win64 and have serious problems because hg
> operations (commit, pus, pull) often fail.
> The error message is always the same: "The process cannot access the file
> because it is being used by another process."
> Unfortunately hg does not tell which file is affected.
> The only way to make hg work again is to kill ever Explorer.exe process.
> Therefore this seems to me like a problem in the shell extension which
> locks file handles and does not release them properly.
> IMHO the shell extension should release file handles as fast as possible.
> Additionally all calls to the CreateFile Win-API function should specify
> dwShareMode as FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE so
> that it does not block any other process.
>  http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858
The GUI windows use a QFileSystemWatcher instance to watch the
repository for changes. Over network disks, this causes problems like
you're reporting. A few releases back we added a configuration option
to only watch for file system events on local disks.