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 2015/03/10 14:21:29 UTC

svn commit: r1665530 - in /subversion/trunk/subversion: libsvn_ra_serf/log.c libsvn_ra_svn/client.c

Author: rhuijben
Date: Tue Mar 10 13:21:29 2015
New Revision: 1665530

URL: http://svn.apache.org/r1665530
Log:
Make the log limit work as documented in ra_svn and ra_serf, by properly
handling a negative limit as no limit (instead of not returning any
items).

Note: this is a client side only fix. The server did the right thing.

* subversion/libsvn_ra_serf/log.c
  (log_closed): Check for >= 0 instead of != 0.

* subversion/libsvn_ra_svn/client.c
  (perform_ra_svn_log): Check for >= 0 instead of != 0.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/log.c
    subversion/trunk/subversion/libsvn_ra_svn/client.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/log.c?rev=1665530&r1=1665529&r2=1665530&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/log.c Tue Mar 10 13:21:29 2015
@@ -272,7 +272,7 @@ log_closed(svn_ra_serf__xml_estate_t *xe
       svn_log_entry_t *log_entry;
       const char *rev_str;
 
-      if (log_ctx->limit && (log_ctx->nest_level == 0)
+      if ((log_ctx->limit > 0) && (log_ctx->nest_level == 0)
           && (++log_ctx->count > log_ctx->limit))
         {
           return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1665530&r1=1665529&r2=1665530&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Tue Mar 10 13:21:29 2015
@@ -1778,7 +1778,7 @@ perform_ra_svn_log(svn_error_t **outer_e
           - 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))
+      if (! ((limit > 0) && (nest_level == 0) && (++nreceived > limit))
           && ! *outer_error)
         {
           svn_error_t *err;