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

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

From: Greg Stein <gstein_at_gmail.com>
Date: Fri, 9 Apr 2010 13:02:32 -0400

On Fri, Apr 9, 2010 at 07:39, <julianfoad_at_apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Apr  9 11:39:22 2010
> @@ -7172,3 +7172,28 @@ svn_wc__db_temp_get_file_external(const
>
>   return svn_error_return(svn_sqlite__reset(stmt));
>  }
> +
> +
> +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_sqlite__stmt_t *stmt;
> +  const char *new_sha1_digest;
> +
> +  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
> +  SVN_ERR_ASSERT(new_sha1_checksum->kind == svn_checksum_sha1);
> +
> +  new_sha1_digest = svn_checksum_serialize(new_sha1_checksum,
> +                                           scratch_pool, scratch_pool);
> +
> +  SVN_ERR(get_statement_for_path(&stmt, db, local_abspath,
> +                                 STMT_UPDATE_BASE_PRISTINE_CHECKSUM,
> +                                 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.

>...

Cheers,
-g
Received on 2010-04-09 19:03:01 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.