On Wed, Jul 27, 2011 at 3:35 PM, Bert Huijben <bert_at_qqmail.nl> wrote:
>
>
> > -----Original Message-----
> > From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> > Sent: woensdag 27 juli 2011 21:23
> > To: Mark Phippard
> > Cc: Subversion Development
> > Subject: Re: Forcing the SQLite db to close?
> >
> > Mark Phippard <markphip_at_gmail.com> writes:
> >
> > > Noticed a problem in Eclipse. When someone wants to remove a project
> > from
> > > Eclipse, the .svn folder cannot be deleted because the wc.db file is in
> use.
> > > This is because, unlike the command line, when we are using JavaHL the
> > > process does not end until someone closes Eclipse.
> > >
> > > Is there an API we could add to JavaHL or something to tell SVN to
> close
> the
> > > DB handles so that the file is not locked?
> > >
> > > Bert/Stefan, how are you dealing with this problem in your GUI tools?
> I
> > > know you have access to more API than we have for JavaH, so maybe there
> > is
> > > already an API and it just needs to be exposed?
> >
> > There is a private function svn_wc__db_drop_root, I think that does what
> > you want. What do you want the public API to look like?
>
> Or you can close the wc context with svn_wc_context_destroy(). This closes
> all contexts at once.
> (Clearing the pool with svn_client_ctx_t / svn_wc_context_t has the same
> effect).
>
I see that JavaHL has a ClientContext class and the Java code creates a
private instance of this class. From what I can see in ClientContext.cpp it
stores the svn_client_ctx_t in the global pool.
/* Create a long-lived client context object in the global pool. */
SVN_JNI_ERR(svn_client_create_context(&persistentCtx,
JNIUtil::getPool()),
);
I wonder if we could simply add a method to JavaHL to destroy this context?
I do not see anywhere that the wc_context is created in JavaHL native code
so not sure if it would be possible to clear the pool used to store those.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-08-03 20:45:53 CEST