-
-
Notifications
You must be signed in to change notification settings - Fork 932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GipPython 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: |
Just ran into this issue. This is quite bad, especially when wanting to do follow up actions with the repository. Interesting, though, how little attention this issue got, based on the possible consequences it has.
The workaround from #546 (comment) also lines up with the docs. Possible other workaround (but seems to be less nice): #718 (comment) Referencing #718 which seems to be about the same problem. TLDR: |
Maybe submitting a PR that makes |
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.
The text was updated successfully, but these errors were encountered: