[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 10:29:03 CEST

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

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.