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

Re: svn commit: r932459 - in /subversion/trunk/subversion/libsvn_wc: entries.c wc-queries.sql wc_db.c wc_db.h

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Mon, 12 Apr 2010 18:41:16 +0100

Greg Stein wrote:
> On Fri, Apr 9, 2010 at 11:17, <julianfoad_at_apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Apr 9 15:17:06 2010
> > @@ -1059,7 +1059,18 @@ read_entries_new(apr_hash_t **result_ent
> > result_pool);
> >
> > if (checksum)
> > - entry->checksum = svn_checksum_to_cstring(checksum, result_pool);
> > + {
> > +#ifdef SVN_EXPERIMENTAL
>
> No need to make this SVN_EXPERIMENTAL. With "normal" trunk, a SHA-1
> will never be returned, so no big deal.

True. I wrapped it to group it with the code that sets it, rather than
because it can't be executed. This code is still in flux. Maybe it's
better to avoid ifdef'd-out code as much as possible, but for now I'll
leave that particular bit.

> > +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Apr 9 15:17:06 2010
> > +svn_error_t *
> > +svn_wc__db_get_pristine_md5(const svn_checksum_t **md5_checksum,
> > + svn_wc__db_t *db,
> > + const char *wri_abspath,
> > + const svn_checksum_t *sha1_checksum,
> > + apr_pool_t *result_pool,
> > + apr_pool_t *scratch_pool)
> > +{
[...]
> > + SVN_ERR(svn_sqlite__column_checksum(md5_checksum, stmt, 0, scratch_pool));
> > +
> > + SVN_ERR_ASSERT((*md5_checksum)->kind == svn_checksum_md5);
> > + return SVN_NO_ERROR;
>
> Reset the statement!

Ah yes. r933272.

And, re. r932361, Greg Stein wrote:
> > +svn_error_t *
> > +svn_wc__db_temp_set_base_checksum(svn_wc__db_t *db,
> > + const char *local_abspath,
> > + const svn_checksum_t *new_sha1_checksum,
> > + apr_pool_t *scratch_pool)
> > +{
[...]
> > + SVN_ERR(svn_sqlite__bind_text(stmt, 3, new_sha1_digest));
> > + SVN_ERR(svn_sqlite__step_done(stmt));
> > +
> > + return SVN_NO_ERROR;
>
> Maybe use svn_sqlite__update() and ensure that 1 row was affected? And
> if not, return SVN_ERR_WC_PATH_NOT_FOUND.

OK, done. (At first I thought that's what _step_done did. Still a SQL
newbie.)

By doing this, I found a serious mistake in my call to this function:
the BASE_NODE doesn't exist at the time when I call it, in some or all
cases, so it's not recording it. Will investigate.

- Julian
Received on 2010-04-12 19:41:51 CEST

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