subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1733830 - /subversion/trunk/subversion/libsvn_fs_x/tree.c
Date Sun, 06 Mar 2016 19:23:24 GMT
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);



Mime
View raw message