You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/07/14 21:58:42 UTC
svn commit: r1503043 - /subversion/trunk/subversion/libsvn_ra_svn/client.c
Author: rhuijben
Date: Sun Jul 14 19:58:42 2013
New Revision: 1503043
URL: http://svn.apache.org/r1503043
Log:
Fix the ra implementation of the 'svn log --limit N' code to really stop
reporting when the limit is reached. Since Subversion 1.2 this limit is
also applied server-side so the only way to see the difference would be
to use a 1.0 or 1.1 svnserve and some code excercising this call without
applying the limit itself (which libsvn_client does for these servers).
* subversion/libsvn_ra_svn/client.c
(perform_ra_svn_log): Move the nreceived variable outside the wile scope.
Found by: danielsh
Modified:
subversion/trunk/subversion/libsvn_ra_svn/client.c
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1503043&r1=1503042&r2=1503043&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Sun Jul 14 19:58:42 2013
@@ -1504,6 +1504,7 @@ perform_ra_svn_log(svn_error_t **outer_e
svn_boolean_t want_author = FALSE;
svn_boolean_t want_message = FALSE;
svn_boolean_t want_date = FALSE;
+ int nreceived = 0;
SVN_ERR(svn_ra_svn__write_tuple(conn, pool, "w((!", "log"));
if (paths)
@@ -1565,7 +1566,6 @@ perform_ra_svn_log(svn_error_t **outer_e
svn_ra_svn_item_t *item;
apr_hash_t *cphash;
svn_revnum_t rev;
- int nreceived;
svn_pool_clear(iterpool);
SVN_ERR(svn_ra_svn__read_item(conn, iterpool, &item));
@@ -1648,8 +1648,10 @@ perform_ra_svn_log(svn_error_t **outer_e
else
cphash = NULL;
- /* Maybe invoke RECEIVER. */
- nreceived = 0;
+ /* Invoke RECEIVER
+ - Except if the server sends more than a >= 1 limit top level items
+ - Or when the callback reported a SVN_ERR_CEASE_INVOCATION
+ in an earlier invocation. */
if (! (limit && (nest_level == 0) && (++nreceived > limit))
&& ! *outer_error)
{