On Mon, Dec 30, 2013 at 11:48 AM, Rene Rivera <grafikrobot@gmail.com> wrote:
On Mon, Dec 30, 2013 at 10:43 AM, Tom Kent <lists@teeks99.com> wrote:
On Sun, Dec 29, 2013 at 9:02 PM, Rene Rivera <grafikrobot@gmail.com> wrote:
>
> I did a tweak to the command execution.. It may be better now.
 
 File "C:\Python27\lib\shutil.py", line 252, in rmtree
    os.rmdir(path)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: u'C:\\local\\teeks99-03\\a\\boost_root'

You had File Explorer open to boost_root? Or something else had a file open in there? Not really sure what else it could be.

I ran into the same problem:

# Getting boost-build.jam...
# Cleaning up "D:\boost-regr\boost_root" directory ...
Traceback (most recent call last):
  File "run.py", line 83, in <module>
    runner(root)
  File "D:\boost-regr\tools_regression_src\regression.py", line 253, in __init__
    self.main()
  File "D:\boost-regr\tools_regression_src\regression.py", line 632, in main
    getattr(self,action_m)()
  File "D:\boost-regr\tools_regression_src\regression.py", line 586, in command_regression

    self.command_cleanup()
  File "D:\boost-regr\tools_regression_src\regression.py", line 262, in command_cleanup
    self.rmtree( self.boost_root )
  File "D:\boost-regr\tools_regression_src\regression.py", line 654, in rmtree
    shutil.rmtree( unicode( path ) )
  File "C:\Python27\lib\shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Python27\lib\shutil.py", line 254, in rmtree
    os.rmdir(path)
WindowsError: [Error 32] The process cannot access the file because it is being used by an
other process: u'D:\\boost-regr\\boost_root'

WindowsExplorer was open, although not open to boost_root. I get that same error fairly regularly when I try to delete a repo working copy or something in a git repo working copy. IIRC, it happens even when the file isn't being tracked by git.

Here is what seems to be happening: TortoiseGit runs a background process named TGitCache.exe. The svn equivalent is TSVNCache.exe. And even after Windows Explorer is shut down, they hang around for awhile. Once TGitCache.exe shuts down then deleting is not a problem.

So when I get the error, first I try "rm -rf my-path". (I've got cygwin installed). That often works. But if t doesn't, I shut down Windows Explorer, and anything else that might be the culprit, and then kill the TGitCache.exe process. I've never bothered to google around to see if there is a better fix. I'll try that later today.

--Beman