This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | add release() method to GitClient API | ||
---|---|---|---|
Product: | versioncontrol | Reporter: | Ondrej Vrabec <ovrabec> |
Component: | Git | Assignee: | Ondrej Vrabec <ovrabec> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | apireviews, DaveE, git, ovrabec, tstupka |
Priority: | P2 | Keywords: | API, API_REVIEW_FAST |
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 218443 | ||
Attachments: |
patch
patch |
Description
Ondrej Vrabec
2012-11-05 15:33:26 UTC
Created attachment 127156 [details]
patch
Please review: JGit library does not automatically lose opened file descriptors and keeps the metadata files opened until Repository.close() is called. This results in collision with external tools (usually on Windows) such as git command line client. See bug #218443. We need to add a method to GitClient API that will be called by all API clients when they stop using the GitClient's instance. The idea is that internally the Git library will count usages of GitClients - will count created instances - and when the last GitClient instance will call release() the underlying repository will be closed along with all the opened files. Please do not use finalizer in GitClient. Created attachment 127195 [details] patch > Please do not use finalizer in GitClient. ...removed i will integrate tomorrow if no other comments come Integrated into 'main-golden', will be available in build *201211170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2ea01c05055d User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #221498 - add release() method to GitClient API adding GitClient.release method to be able to release any open file descriptors held by JGit |