You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/03/06 20:23:24 UTC
svn commit: r1733830 - /subversion/trunk/subversion/libsvn_fs_x/tree.c
Author: stefan2
Date: Sun Mar 6 19:23:24 2016
New Revision: 1733830
URL: http://svn.apache.org/viewvc?rev=1733830&view=rev
Log:
Fix botched changes list iteration logic in FSX.
* subversion/libsvn_fs_x/tree.c
(x_revision_changes_iterator_get): Read next block *after* exhausting the
current one. Continue at index 0 inside
the new block.
Modified:
subversion/trunk/subversion/libsvn_fs_x/tree.c
Modified: subversion/trunk/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/tree.c?rev=1733830&r1=1733829&r2=1733830&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/tree.c Sun Mar 6 19:23:24 2016
@@ -2289,7 +2289,7 @@ x_revision_changes_iterator_get(svn_fs_p
/* If we exhausted our block of changes and did not reach the end of the
list, yet, fetch the next block. Note that that block may be empty. */
- if ((data->idx <= data->changes->nelts) && !data->context->eol)
+ if ((data->idx >= data->changes->nelts) && !data->context->eol)
{
apr_pool_t *changes_pool = data->changes->pool;
@@ -2297,6 +2297,7 @@ x_revision_changes_iterator_get(svn_fs_p
svn_pool_clear(changes_pool);
SVN_ERR(svn_fs_x__get_changes(&data->changes, data->context,
changes_pool, data->scratch_pool));
+ data->idx = 0;
/* Immediately release any temporary data. */
svn_pool_clear(data->scratch_pool);