Hallo Robert Funny domain name :-)
On 2011-10-31 15:22, Robert Kochem wrote: > Hi. > > 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. Any virus scanners running? Other shell extensions? > Therefore this seems to me like a problem in the shell extension which > locks file handles and does not release them properly. Are you sure your analysis is correct? Did you check how the shell extension accesses files? > 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. > > Robert > > [1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858 > (v=vs.85).aspx This should already be the case since: https://bitbucket.org/tortoisehg/shellext/changeset/3546bb81cf63 In effect since June 2009 The shell extension only reads the files .hg/dirstate and .hg/thgstatus For files in the working dir (=tracked files), the shell extension is only doing "stat" calls via win32 API FindFirstFileW and FindClose: https://bitbucket.org/tortoisehg/shellext/src/ff667fa17d23/src/Winstat.cpp#cl-21 Using the FindFirstFileW / FindClose pair has proven to be the fastest way get stat data (modification time etc). Adrian ------------------------------------------------------------------------------ Get your Android app more play: Bring it to the BlackBerry PlayBook in minutes. BlackBerry App World™ now supports Android™ Apps for the BlackBerry® PlayBook™. Discover just how easy and simple it is! http://p.sf.net/sfu/android-dev2dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop