-
Notifications
You must be signed in to change notification settings - Fork 153
Ngit File locks #49
Comments
What version of ngit are you using? Is it the very latest commit in master? |
Yes i've pulled from here on my recent builds and the problem is definitely there.. If I do a simple clone, and then try and recursively delete the folder i've cloned into a few seconds later (even 10 second later) the files are locked. |
Any update to this? I still can't delete the cloned directory within a short timespan |
Try this:
am I missing something? the IDX will be locked. calling |
This is also mentioned in a number of jGit posts: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01951.html http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01954.html I've tested by even This seems to be a breaking issue with NGit. |
Yeah. JGit is broken in that regard. I haven't managed to find a high level fix, so that means we're stuck with waiting for the JGit team to fix it. |
Could you try forcing a few GC collections? Try doing it at least 3 times. |
Are there any hacks I can do to release the file handle? |
I've tried setting FileAttributes to normal, but it didn't cut it. |
Yeah I've also tried to recommended many rounds of Where can I grab these? |
I have found a way to clear all of the file handles. You need to really be specific about your releases. original example:
New version without file locks:
|
I find that the fluent API makes it very easy to lose track of references and file handles made between fluent calls. This seems to be a serious issue with Ngit that should be addressed whereby if being called through the fluent API, previous references should be closed in consecutive calls. |
While trying to write some NGit related tests I always get
UnauthorizedAccessExceptions
when trying to delete my repo path after creating it.is there a way to release any pack file locks?
running
repo.GetRepository().Close();
doesn't seem to fix things.
The text was updated successfully, but these errors were encountered: