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