[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Forcing the SQLite db to close?

From: Mark Phippard <markphip_at_gmail.com>
Date: Wed, 3 Aug 2011 13:42:12 -0400

On Wed, Jul 27, 2011 at 3:31 PM, Stefan Küng <tortoisesvn_at_gmail.com> wrote:

> On 27.07.2011 20:49, Mark Phippard wrote:
>
>> 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?
>>
>
> All you need to do is to close the wc context:
> svn_wc_context_destroy()
> and that will close the db as well.
>
>
Still looking for a way to do this from Java. I was hoping that the Java
garbage collection and finalization would at least do it, but it does not
seem to. I searched the JavaHL native code and do not see where this method
is called. Should things like the dispose and finalize methods not do stuff
like this to cleanup resource usage?

Anyone have any ideas how I can do this from Java with the limited stuff
that has been exposed to the API?

I guess ideally, I would like the dispose() method to free these resources,
but we would also need the segfault fixed that happens when GC runs and
frees the objects you have disposed.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-08-03 19:42:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.