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

RE: svn commit: r1365518 - /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 25 Jul 2012 13:04:46 +0200

> -----Original Message-----
> From: philip_at_apache.org [mailto:philip_at_apache.org]
> Sent: woensdag 25 juli 2012 13:01
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1365518 -
> /subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
>
> Author: philip
> Date: Wed Jul 25 11:01:26 2012
> New Revision: 1365518
>
> URL: http://svn.apache.org/viewvc?rev=1365518&view=rev
> Log:
> Fix issue 4029, verify fails on r0 for FSFS repo with empty rep-cache.
>
> * subversion/libsvn_fs_fs/rep-cache.c
> (svn_fs_fs__walk_rep_reference): Handle empty cache, remove pointless
> comment.
>
> Modified:
> subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
>
> Modified: subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/re
> p-cache.c?rev=1365518&r1=1365517&r2=1365518&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/rep-cache.c Wed Jul 25
> 11:01:26 2012
> @@ -158,11 +158,11 @@ svn_fs_fs__walk_rep_reference(svn_fs_t *
> STMT_GET_MAX_REV));
> SVN_ERR(svn_sqlite__step(&have_row, stmt2));
> max = svn_sqlite__column_revnum(stmt2, 0);
> - SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
> + if (SVN_IS_VALID_REVNUM(max)) /* The rep-cache could be empty. */
> + SVN_ERR(svn_fs_fs__revision_exists(max, fs, iterpool));
> SVN_ERR(svn_sqlite__reset(stmt2));

Not really part of this patch, but this code will not call sqlite__reset on failure which will keep the sqlite database read-locked until it is reset or the sqlite database closed.

        Bert
> }
>
> - /* Get the statement. (There are no arguments to bind.) */
> SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->rep_cache_db,
> STMT_GET_REPS_FOR_RANGE));
> SVN_ERR(svn_sqlite__bindf(stmt, "rr",
>
Received on 2012-07-25 13:05:32 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.