Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGipPython lock folder with repo on windows so it could not be removed #387
Comments
There is a thing with multiple instances of git running simultaneously. If two of them running at the same time there could be a lock. Maybe there is inside gitpython several git processes run at the same time on commit? Also there is same problems with gitdb (master branch)
|
Thanks for that wonderfully detailed and conclusive issue ! At some point I stopped testing on windows as well, which was in a time when AppVeyor and travis didn't even exist yet to compensate. However, there should be a Even though I don't think I will be able to fix the issue, I will leave it open for everyone to see. |
Could you point me in the direction of the release() method so I can try it? I can't find it. I am running into this problem as well. I tried this: |
Please search issues with |
Found something that worked: |
Tested on
GitPython version: 1.0.2
Windows: Server 2012
Git: 2.7.0.windows
To reproduce
you'll se
WindowsError: [Error 32] The process cannot access the file because it is being used by another process:
Also you'll see that there are four git subprocesses running until python process will be closed (I was using REPL and this subprocesses were hanging there until I closed REPL).
They are
git cat-file --batch-check
andgit cat-file --batch
.On macos calling this example in REPL leads to appearing of two non finished git-processes too.
Process Explorer show that the folder (

path_to_repo
) is locked by 4 git processes.Maybe there is concept that Repo should be closed somehow but i could not find that kind of API.
Some GitPython-tests fails with this error (tests run on master branch):
P.S. I know it is a problem to test on windows platform. My colleague mentioned AppVeyor CI for windows CI. Pip-accel is using it.