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

Re: [PATCH][merge-tracking]libsvn_fs_util

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-09-19 14:41:45 CEST

On Tue, Sep 19, 2006 at 02:24:49PM +0530, Kamesh Jayachandran wrote:
>
> >I assume that SQLite returns an identifiable error if the database
> >doesn't exist when you try to open it, so you could just trap that error
> >and create it then:
> >
> Unfortunately sqlite3_open never fails for non-existent db rather
> creates the empty db.
>

Hm. That's not ideal - get_index should be a read-only operation, but
you can't prevent it from creating the database. And SQLite doesn't
give you a distinctive error for 'table does not exist', so you can't
decide to create the table if the query fails.

I suppose it's probably best to leave it as-is then: have an explicit
call to initialise the mergeinfo index, and allow the 'get' and 'set'
functions to fail until that's been done.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 19 14:42:03 2006

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.