|Re: [jgit-dev] Files remaining locked after repository close in Windows|
FWIW, the repo can be deleted with: "FileUtils.delete(tempDir,
FileUtils.RECURSIVE | FileUtils.RETRY);", but what Mike does seems to
be perfectly legal and should work.
On Thu, Dec 20, 2012 at 1:28 AM, Shawn Pearce <spearce@xxxxxxxxxxx> wrote:
> On Wed, Dec 19, 2012 at 1:47 PM, Mike Youngstrom <youngm@xxxxxxxxx> wrote:
>> I've seen several posts about repository locking from the eGit side but
>> haven't really seen any solutions.
>> I'm using jgit 126.96.36.199209190230-r.
>> The following code fails in windows because some .pack files remain locked
>> until my VM closes. Any ideas what I'm doing wrong? Here is a test case
>> going against a test github repository I have set up so you should be able
>> to just copy and run.
>> The error I see in windows is:
>> Exception in thread "main" java.nio.file.AccessDeniedException:
> This is... odd. JGit shouldn't be keeping a .idx file open. This would
> appear to be a leaked resource handle. We do keep .pack files open,
> but those are supposed to be closed when you call close() on the
> Repository object, assuming the number of close calls matches the
> number of open increments that were performed on the Repository
> But .idx files are always handled as open, read entire file, close. We
> shouldn't ever be keeping the .idx file handle open. So this sounds
> like a resource leak.
> jgit-dev mailing list
Back to the top