subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1827126 - in /subversion/branches/1.10.x: ./ STATUS build.conf subversion/libsvn_delta/svndiff.c subversion/tests/libsvn_delta/ subversion/tests/libsvn_delta/svndiff-stream-test.c
Date Sun, 18 Mar 2018 04:00:13 GMT
Author: svn-role
Date: Sun Mar 18 04:00:13 2018
New Revision: 1827126

URL: http://svn.apache.org/viewvc?rev=1827126&view=rev
Log:
Merge r1826747 from trunk:

 * r1826747
   Fix a cause of unexpected short reads on the stream returned by the
   svn_txdelta_to_svndiff_stream() API.
   Justification:
     A bug that can cause failing commits over http://, regression
     introduced in 1.10.
   Votes:
     +1: kotkov, philip, brane

Added:
    subversion/branches/1.10.x/subversion/tests/libsvn_delta/svndiff-stream-test.c
      - copied unchanged from r1826747, subversion/trunk/subversion/tests/libsvn_delta/svndiff-stream-test.c
Modified:
    subversion/branches/1.10.x/   (props changed)
    subversion/branches/1.10.x/STATUS
    subversion/branches/1.10.x/build.conf
    subversion/branches/1.10.x/subversion/libsvn_delta/svndiff.c
    subversion/branches/1.10.x/subversion/tests/libsvn_delta/   (props changed)

Propchange: subversion/branches/1.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Mar 18 04:00:13 2018
@@ -100,4 +100,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788
+/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788,1826747

Modified: subversion/branches/1.10.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1827126&r1=1827125&r2=1827126&view=diff
==============================================================================
--- subversion/branches/1.10.x/STATUS (original)
+++ subversion/branches/1.10.x/STATUS Sun Mar 18 04:00:13 2018
@@ -43,12 +43,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1826747
-   Fix a cause of unexpected short reads on the stream returned by the
-   svn_txdelta_to_svndiff_stream() API.
-   Justification:
-     A bug that can cause failing commits over http://, regression
-     introduced in 1.10.
-   Votes:
-     +1: kotkov, philip, brane

Modified: subversion/branches/1.10.x/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/build.conf?rev=1827126&r1=1827125&r2=1827126&view=diff
==============================================================================
--- subversion/branches/1.10.x/build.conf (original)
+++ subversion/branches/1.10.x/build.conf Sun Mar 18 04:00:13 2018
@@ -1207,6 +1207,14 @@ sources = window-test.c
 install = test
 libs = libsvn_test libsvn_delta libsvn_subr apriconv apr
 
+[svndiff-stream-test]
+description = Test svndiff streams
+type = exe
+path = subversion/tests/libsvn_delta
+sources = svndiff-stream-test.c
+install = test
+libs = libsvn_test libsvn_delta libsvn_subr apriconv apr
+
 # ----------------------------------------------------------------------------
 # Tests for libsvn_client
 
@@ -1580,6 +1588,7 @@ libs = __ALL__
        op-depth-test dirent_uri-test wc-queries-test wc-test
        auth-test
        parse-diff-test x509-test xml-test afl-x509 compress-test
+       svndiff-stream-test
 
 [__MORE__]
 type = project

Modified: subversion/branches/1.10.x/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/libsvn_delta/svndiff.c?rev=1827126&r1=1827125&r2=1827126&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/1.10.x/subversion/libsvn_delta/svndiff.c Sun Mar 18 04:00:13 2018
@@ -1026,11 +1026,11 @@ svndiff_stream_read_fn(void *baton, char
   apr_size_t left = *len;
   apr_size_t read = 0;
 
-  while (left && !b->hit_eof)
+  while (left)
     {
       apr_size_t chunk_size;
 
-      if (b->read_pos == b->window_buffer->len)
+      if (b->read_pos == b->window_buffer->len && !b->hit_eof)
         {
           svn_txdelta_window_t *window;
 
@@ -1050,6 +1050,9 @@ svndiff_stream_read_fn(void *baton, char
       else
         chunk_size = left;
 
+      if (!chunk_size)
+          break;
+
       memcpy(buffer, b->window_buffer->data + b->read_pos, chunk_size);
       b->read_pos += chunk_size;
       buffer += chunk_size;

Propchange: subversion/branches/1.10.x/subversion/tests/libsvn_delta/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Mar 18 04:00:13 2018
@@ -8,6 +8,7 @@ vdelta-test
 random-test
 xml-output-test
 svndiff-test
+svndiff-stream-test
 window-test
 editor-test
 combined



Mime
View raw message