Hi Kamesh,
On Tue, Sep 19, 2006 at 11:45:36AM +0530, Kamesh Jayachandran wrote:
> >Do you really need a separate call for creating the database? Why can't
> >you just create it on the first call to update_index?
> >
> >
> Yes it is possible. I see a point in your suggestion.
> Creating 'mergeinfo.db' from first call to 'update_index' has the
> advantage of seamlessly upgrading the old repos.
> Downside I see for every update_index call I need to do the check.
> Not sure what would be the better way to take.
>
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:
err = open_database(&handle, ...)
if (err && err != database_not_found)
return err;
if (err)
create_database(&handle, ...)
You probably could do something similar in get_mergeinfo, allowing you
to treat a non-existent database the same as an empty one.
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 10:29:20 2006