subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1561903 - in /subversion/trunk: subversion/libsvn_delta/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/libsvn_wc/ subversion/mod_dav_svn/ subversion/...
Date Mon, 27 Jan 2014 23:07:58 GMT
Author: rhuijben
Date: Mon Jan 27 23:07:57 2014
New Revision: 1561903

URL: http://svn.apache.org/r1561903
Log:
Following up on r1561688, switch almost every caller of svn_stream_read() to
its successor svn_stream_read_full(). Do this to resolve many deprecation
warnings (and to avoid somebody else accidentally doing the invalid conversion
to svn_stream_read2()).

There are no functional changes as svn_stream_read() is a direct call to
svn_stream_read_full().

* subversion/libsvn_delta/svndiff.c
  (read_one_byte): Update caller.

* subversion/libsvn_delta/text_delta.c
  (txdelta_next_window,
   tpush_write_handler,
   apply_window,
   svn_txdelta_send_stream): Update caller.

* subversion/libsvn_fs_base/lock.c
  (svn_fs_base__get_locks): Update caller.

* subversion/libsvn_fs_fs/recovery.c
  (read_handler_recover): Update caller.

* subversion/libsvn_fs_x/cached_data.c
  (get_dir_contents): Update caller.

* subversion/libsvn_fs_x/pack.c
  (write_reps_containers): Update caller.

* subversion/libsvn_repos/load.c
  (read_key_or_val,
   parse_text_block,
   svn_repos_parse_dumpstream3): Update caller.

* subversion/libsvn_subr/config_file.c
  (parser_getc): Update caller.

* subversion/libsvn_subr/hash.c
  (svn_hash__read_entry):

* subversion/libsvn_subr/packed_data.c
  (read_stream_uint,
   read_stream_data,
   svn_packed__data_read): Update caller.

* subversion/libsvn_subr/subst.c
  (translated_stream_read,
   read_handler_special): Update caller.

* subversion/libsvn_wc/adm_crawler.c
  (read_handler_copy): Update caller.

* subversion/mod_dav_svn/repos.c
  (deliver): Update caller.

* subversion/svnserve/serve.c
  (get_file): Update caller.

* subversion/tests/libsvn_subr/spillbuf-test.c
  (test_spillbuf_stream): Update caller.

* subversion/tests/libsvn_subr/stream-test.c
  (test_stream_from_string,
   test_stream_compressed,
   test_stream_seek_stringbuf,
   test_stream_seek_translated,
   test_stream_compressed_empty_file): Update caller.

* subversion/tests/libsvn_wc/pristine-store-test.c
  (pristine_delete_while_open): Update caller.

* subversion/tests/svn_test_fs.c
  (svn_test__stream_to_string): Update caller.

* tools/server-side/fsfs-stats.c
  (read_windows): Update caller.

Modified:
    subversion/trunk/subversion/libsvn_delta/svndiff.c
    subversion/trunk/subversion/libsvn_delta/text_delta.c
    subversion/trunk/subversion/libsvn_fs_base/lock.c
    subversion/trunk/subversion/libsvn_fs_fs/recovery.c
    subversion/trunk/subversion/libsvn_fs_x/cached_data.c
    subversion/trunk/subversion/libsvn_fs_x/pack.c
    subversion/trunk/subversion/libsvn_repos/load.c
    subversion/trunk/subversion/libsvn_subr/config_file.c
    subversion/trunk/subversion/libsvn_subr/hash.c
    subversion/trunk/subversion/libsvn_subr/packed_data.c
    subversion/trunk/subversion/libsvn_subr/subst.c
    subversion/trunk/subversion/libsvn_wc/adm_crawler.c
    subversion/trunk/subversion/mod_dav_svn/repos.c
    subversion/trunk/subversion/svnserve/serve.c
    subversion/trunk/subversion/tests/libsvn_subr/spillbuf-test.c
    subversion/trunk/subversion/tests/libsvn_subr/stream-test.c
    subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c
    subversion/trunk/subversion/tests/svn_test_fs.c
    subversion/trunk/tools/server-side/fsfs-stats.c

Modified: subversion/trunk/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/svndiff.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Mon Jan 27 23:07:57 2014
@@ -780,7 +780,7 @@ read_one_byte(unsigned char *byte, svn_s
   char c;
   apr_size_t len = 1;
 
-  SVN_ERR(svn_stream_read(stream, &c, &len));
+  SVN_ERR(svn_stream_read_full(stream, &c, &len));
   if (len == 0)
     return svn_error_create(SVN_ERR_SVNDIFF_UNEXPECTED_END, NULL,
                             _("Unexpected end of svndiff input"));
@@ -861,7 +861,7 @@ svn_txdelta_read_svndiff_window(svn_txde
                              &inslen, &newlen));
   len = inslen + newlen;
   buf = apr_palloc(pool, len);
-  SVN_ERR(svn_stream_read(stream, (char*)buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, (char*)buf, &len));
   if (len < inslen + newlen)
     return svn_error_create(SVN_ERR_SVNDIFF_UNEXPECTED_END, NULL,
                             _("Unexpected end of svndiff input"));

Modified: subversion/trunk/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/text_delta.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/trunk/subversion/libsvn_delta/text_delta.c Mon Jan 27 23:07:57 2014
@@ -366,14 +366,14 @@ txdelta_next_window(svn_txdelta_window_t
   /* Read the source stream. */
   if (b->more_source)
     {
-      SVN_ERR(svn_stream_read(b->source, b->buf, &source_len));
+      SVN_ERR(svn_stream_read_full(b->source, b->buf, &source_len));
       b->more_source = (source_len == SVN_DELTA_WINDOW_SIZE);
     }
   else
     source_len = 0;
 
   /* Read the target stream. */
-  SVN_ERR(svn_stream_read(b->target, b->buf + source_len, &target_len));
+  SVN_ERR(svn_stream_read_full(b->target, b->buf + source_len, &target_len));
   b->pos += source_len;
 
   if (target_len == 0)
@@ -522,7 +522,7 @@ tpush_write_handler(void *baton, const c
       if (tb->source_len == 0 && !tb->source_done)
         {
           tb->source_len = SVN_DELTA_WINDOW_SIZE;
-          SVN_ERR(svn_stream_read(tb->source, tb->buf, &tb->source_len));
+          SVN_ERR(svn_stream_read_full(tb->source, tb->buf, &tb->source_len));
           if (tb->source_len < SVN_DELTA_WINDOW_SIZE)
             tb->source_done = TRUE;
         }
@@ -819,7 +819,7 @@ apply_window(svn_txdelta_window_t *windo
   if (ab->sbuf_len < window->sview_len)
     {
       len = window->sview_len - ab->sbuf_len;
-      err = svn_stream_read(ab->source, ab->sbuf + ab->sbuf_len, &len);
+      err = svn_stream_read_full(ab->source, ab->sbuf + ab->sbuf_len, &len);
       if (err == SVN_NO_ERROR && len != window->sview_len - ab->sbuf_len)
         err = svn_error_create(SVN_ERR_INCOMPLETE_DATA, NULL,
                                "Delta source ended unexpectedly");
@@ -836,13 +836,7 @@ apply_window(svn_txdelta_window_t *windo
 
   /* Write out the output. */
 
-  /* ### We've also considered just adding two (optionally null)
-     arguments to svn_stream_create(): read_checksum and
-     write_checksum.  Then instead of every caller updating an md5
-     context when it calls svn_stream_write() or svn_stream_read(),
-     streams would do it automatically, and verify the checksum in
-     svn_stream_closed().  But this might be overkill for issue #689;
-     so for now we just update the context here. */
+  /* Just update the context here. */
   if (ab->result_digest)
     apr_md5_update(&(ab->md5_context), ab->tbuf, len);
 
@@ -936,7 +930,7 @@ svn_error_t *svn_txdelta_send_stream(svn
     {
       apr_size_t read_len = SVN__STREAM_CHUNK_SIZE;
 
-      SVN_ERR(svn_stream_read(stream, read_buf, &read_len));
+      SVN_ERR(svn_stream_read_full(stream, read_buf, &read_len));
       if (read_len == 0)
         break;
 

Modified: subversion/trunk/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_base/lock.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/trunk/subversion/libsvn_fs_base/lock.c Mon Jan 27 23:07:57 2014
@@ -496,12 +496,12 @@ svn_fs_base__get_locks(svn_fs_t *fs,
 
       /* Now read that much into a buffer. */
       skel_buf = apr_palloc(pool, skel_len + 1);
-      SVN_ERR(svn_stream_read(stream, skel_buf, &skel_len));
+      SVN_ERR(svn_stream_read_full(stream, skel_buf, &skel_len));
       skel_buf[skel_len] = '\0';
 
       /* Read the extra newline that follows the skel. */
       len = 1;
-      SVN_ERR(svn_stream_read(stream, &c, &len));
+      SVN_ERR(svn_stream_read_full(stream, &c, &len));
       if (c != '\n')
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
 

Modified: subversion/trunk/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/recovery.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/recovery.c Mon Jan 27 23:07:57 2014
@@ -129,7 +129,7 @@ read_handler_recover(void *baton, char *
     bytes_to_read = (apr_size_t)b->remaining;
   b->remaining -= bytes_to_read;
 
-  return svn_stream_read(b->stream, buffer, &bytes_to_read);
+  return svn_stream_read_full(b->stream, buffer, &bytes_to_read);
 }
 
 /* Part of the recovery procedure.  Read the directory noderev at offset

Modified: subversion/trunk/subversion/libsvn_fs_x/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/cached_data.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/cached_data.c Mon Jan 27 23:07:57 2014
@@ -1986,7 +1986,7 @@ get_dir_contents(apr_hash_t *entries,
 
       /* The representation is immutable.  Read it normally. */
       SVN_ERR(svn_fs_x__get_contents(&contents, fs, noderev->data_rep, text_pool));
-      SVN_ERR(svn_stream_read(contents, text->data, &text->len));
+      SVN_ERR(svn_stream_read_full(contents, text->data, &text->len));
       SVN_ERR(svn_stream_close(contents));
 
       /* de-serialize hash */

Modified: subversion/trunk/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/pack.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/pack.c Mon Jan 27 23:07:57 2014
@@ -1272,7 +1272,7 @@ write_reps_containers(pack_context_t *co
       contents->len = representation.expanded_size;
 
       /* The representation is immutable.  Read it normally. */
-      SVN_ERR(svn_stream_read(stream, contents->data, &contents->len));
+      SVN_ERR(svn_stream_read_full(stream, contents->data, &contents->len));
       SVN_ERR(svn_stream_close(stream));
 
       list_index = svn_fs_x__reps_add(container,

Modified: subversion/trunk/subversion/libsvn_repos/load.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/load.c (original)
+++ subversion/trunk/subversion/libsvn_repos/load.c Mon Jan 27 23:07:57 2014
@@ -150,7 +150,7 @@ read_key_or_val(char **pbuf,
   char c;
 
   numread = len;
-  SVN_ERR(svn_stream_read(stream, buf, &numread));
+  SVN_ERR(svn_stream_read_full(stream, buf, &numread));
   *actual_length += numread;
   if (numread != len)
     return svn_error_trace(stream_ran_dry());
@@ -158,7 +158,7 @@ read_key_or_val(char **pbuf,
 
   /* Suck up extra newline after key data */
   numread = 1;
-  SVN_ERR(svn_stream_read(stream, &c, &numread));
+  SVN_ERR(svn_stream_read_full(stream, &c, &numread));
   *actual_length += numread;
   if (numread != 1)
     return svn_error_trace(stream_ran_dry());
@@ -343,7 +343,7 @@ parse_text_block(svn_stream_t *stream,
         rlen = (apr_size_t) content_length;
 
       num_to_read = rlen;
-      SVN_ERR(svn_stream_read(stream, buffer, &rlen));
+      SVN_ERR(svn_stream_read_full(stream, buffer, &rlen));
       content_length -= rlen;
       if (rlen != num_to_read)
         return stream_ran_dry();
@@ -654,7 +654,7 @@ svn_repos_parse_dumpstream3(svn_stream_t
                 rlen = (apr_size_t) remaining;
 
               num_to_read = rlen;
-              SVN_ERR(svn_stream_read(stream, buffer, &rlen));
+              SVN_ERR(svn_stream_read_full(stream, buffer, &rlen));
               remaining -= rlen;
               if (rlen != num_to_read)
                 return stream_ran_dry();

Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config_file.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/config_file.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config_file.c Mon Jan 27 23:07:57 2014
@@ -104,8 +104,8 @@ parser_getc(parse_context_t *ctx, int *c
           ctx->buffer_pos = 0;
           ctx->buffer_size = sizeof(ctx->parser_buffer);
 
-          SVN_ERR(svn_stream_read(ctx->stream, ctx->parser_buffer,
-                                  &(ctx->buffer_size)));
+          SVN_ERR(svn_stream_read_full(ctx->stream, ctx->parser_buffer,
+                                       &(ctx->buffer_size)));
 
           if (ctx->buffer_pos < ctx->buffer_size)
             {

Modified: subversion/trunk/subversion/libsvn_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/hash.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/hash.c (original)
+++ subversion/trunk/subversion/libsvn_subr/hash.c Mon Jan 27 23:07:57 2014
@@ -136,12 +136,12 @@ svn_hash__read_entry(svn_hash__entry_t *
 
       /* Now read that much into a buffer. */
       entry->key = apr_palloc(pool, entry->keylen + 1);
-      SVN_ERR(svn_stream_read(stream, entry->key, &entry->keylen));
+      SVN_ERR(svn_stream_read_full(stream, entry->key, &entry->keylen));
       entry->key[entry->keylen] = '\0';
 
       /* Suck up extra newline after key data */
       len = 1;
-      SVN_ERR(svn_stream_read(stream, &c, &len));
+      SVN_ERR(svn_stream_read_full(stream, &c, &len));
       if (c != '\n')
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
                                 _("Serialized hash malformed"));
@@ -160,12 +160,12 @@ svn_hash__read_entry(svn_hash__entry_t *
           entry->vallen = (apr_size_t)ui64;
 
           entry->val = apr_palloc(pool, entry->vallen + 1);
-          SVN_ERR(svn_stream_read(stream, entry->val, &entry->vallen));
+          SVN_ERR(svn_stream_read_full(stream, entry->val, &entry->vallen));
           entry->val[entry->vallen] = '\0';
 
           /* Suck up extra newline after val data */
           len = 1;
-          SVN_ERR(svn_stream_read(stream, &c, &len));
+          SVN_ERR(svn_stream_read_full(stream, &c, &len));
           if (c != '\n')
             return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
                                     _("Serialized hash malformed"));
@@ -187,12 +187,12 @@ svn_hash__read_entry(svn_hash__entry_t *
 
       /* Now read that much into a buffer. */
       entry->key = apr_palloc(pool, entry->keylen + 1);
-      SVN_ERR(svn_stream_read(stream, entry->key, &entry->keylen));
+      SVN_ERR(svn_stream_read_full(stream, entry->key, &entry->keylen));
       entry->key[entry->keylen] = '\0';
 
       /* Suck up extra newline after key data */
       len = 1;
-      SVN_ERR(svn_stream_read(stream, &c, &len));
+      SVN_ERR(svn_stream_read_full(stream, &c, &len));
       if (c != '\n')
         return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL,
                                 _("Serialized hash malformed"));

Modified: subversion/trunk/subversion/libsvn_subr/packed_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/packed_data.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/packed_data.c (original)
+++ subversion/trunk/subversion/libsvn_subr/packed_data.c Mon Jan 27 23:07:57 2014
@@ -706,7 +706,7 @@ read_stream_uint(svn_stream_t *stream, a
   do
     {
       apr_size_t len = 1;
-      SVN_ERR(svn_stream_read(stream, (char *)&c, &len));
+      SVN_ERR(svn_stream_read_full(stream, (char *)&c, &len));
       if (len != 1)
         return svn_error_create(SVN_ERR_CORRUPT_PACKED_DATA, NULL,
                                 _("Unexpected end of stream"));
@@ -949,7 +949,7 @@ read_stream_data(svn_stream_t *stream,
 
   svn_stringbuf_ensure(compressed, compressed_len);
   compressed->len = compressed_len;
-  SVN_ERR(svn_stream_read(stream, compressed->data, &compressed->len));
+  SVN_ERR(svn_stream_read_full(stream, compressed->data, &compressed->len));
   compressed->data[compressed_len] = '\0';
 
   SVN_ERR(svn__decompress(compressed, uncompressed, uncompressed_len));
@@ -1033,7 +1033,7 @@ svn_packed__data_read(svn_packed__data_r
     = svn_stringbuf_create_ensure((apr_size_t)tree_struct_size, scratch_pool);
   tree_struct->len = (apr_size_t)tree_struct_size;
   
-  SVN_ERR(svn_stream_read(stream, tree_struct->data, &tree_struct->len));
+  SVN_ERR(svn_stream_read_full(stream, tree_struct->data, &tree_struct->len));
   tree_struct->data[tree_struct->len] = '\0';
 
   /* reconstruct tree structure */

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Mon Jan 27 23:07:57 2014
@@ -1290,7 +1290,7 @@ translated_stream_read(void *baton,
 
           svn_stringbuf_setempty(b->readbuf);
           b->readbuf_off = 0;
-          SVN_ERR(svn_stream_read(b->stream, b->buf, &readlen));
+          SVN_ERR(svn_stream_read_full(b->stream, b->buf, &readlen));
           buf_stream = svn_stream_from_stringbuf(b->readbuf, b->iterpool);
 
           SVN_ERR(translate_chunk(buf_stream, b->in_baton, b->buf,
@@ -1850,7 +1850,7 @@ read_handler_special(void *baton, char *
 
   if (btn->read_stream)
     /* We actually found a file to read from */
-    return svn_stream_read(btn->read_stream, buffer, len);
+    return svn_stream_read_full(btn->read_stream, buffer, len);
   else
     return svn_error_createf(APR_ENOENT, NULL,
                              "Can't read special file: File '%s' not found",

Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Mon Jan 27 23:07:57 2014
@@ -876,7 +876,7 @@ read_handler_copy(void *baton, char *buf
 {
   struct copying_stream_baton *btn = baton;
 
-  SVN_ERR(svn_stream_read(btn->source, buffer, len));
+  SVN_ERR(svn_stream_read_full(btn->source, buffer, len));
 
   return svn_stream_write(btn->target, buffer, len);
 }

Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/repos.c Mon Jan 27 23:07:57 2014
@@ -3669,7 +3669,7 @@ deliver(const dav_resource *resource, ap
         apr_size_t bufsize = SVN__STREAM_CHUNK_SIZE;
 
         /* read from the FS ... */
-        serr = svn_stream_read(stream, block, &bufsize);
+        serr = svn_stream_read_full(stream, block, &bufsize);
         if (serr != NULL)
           {
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Mon Jan 27 23:07:57 2014
@@ -1587,7 +1587,7 @@ static svn_error_t *get_file(svn_ra_svn_
       while (1)
         {
           len = sizeof(buf);
-          err = svn_stream_read(contents, buf, &len);
+          err = svn_stream_read_full(contents, buf, &len);
           if (err)
             break;
           if (len > 0)

Modified: subversion/trunk/subversion/tests/libsvn_subr/spillbuf-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/spillbuf-test.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/spillbuf-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/spillbuf-test.c Mon Jan 27 23:07:57 2014
@@ -350,7 +350,7 @@ test_spillbuf_stream(apr_pool_t *pool)
   /* now: two blocks: 8 and 4 bytes  */
 
   readlen = 8;
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "abcdefgh", 8) == 0);
   /* now: one block: 4 bytes  */
@@ -358,7 +358,7 @@ test_spillbuf_stream(apr_pool_t *pool)
   SVN_ERR(svn_stream_write(stream, "mnopqr", &writelen));
   /* now: two blocks: 8 and 2 bytes  */
 
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "ijklmnop", 8) == 0);
   /* now: one block: 2 bytes  */
@@ -368,14 +368,14 @@ test_spillbuf_stream(apr_pool_t *pool)
   SVN_ERR(svn_stream_write(stream, "GHIJKL", &writelen));
   /* now: two blocks: 8 and 6 bytes, and 6 bytes spilled to a file  */
 
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 8
                   && memcmp(readbuf, "qrstuvwx", 8) == 0);
   readlen = 6;
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 6
                   && memcmp(readbuf, "ABCDEF", 6) == 0);
-  SVN_ERR(svn_stream_read(stream, readbuf, &readlen));
+  SVN_ERR(svn_stream_read_full(stream, readbuf, &readlen));
   SVN_TEST_ASSERT(readlen == 6
                   && memcmp(readbuf, "GHIJKL", 6) == 0);
 

Modified: subversion/trunk/subversion/tests/libsvn_subr/stream-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/stream-test.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/stream-test.c Mon Jan 27 23:07:57 2014
@@ -73,7 +73,7 @@ test_stream_from_string(apr_pool_t *pool
       while (len == TEST_BUF_SIZE)
         {
           /* Read a chunk ... */
-          SVN_ERR(svn_stream_read(stream, buffer, &len));
+          SVN_ERR(svn_stream_read_full(stream, buffer, &len));
 
           /* ... and append the chunk to the stringbuf. */
           svn_stringbuf_appendbytes(outbuf, buffer, len);
@@ -206,7 +206,7 @@ test_stream_compressed(apr_pool_t *pool)
       while (len >= TEST_BUF_SIZE)
         {
           len = TEST_BUF_SIZE;
-          SVN_ERR(svn_stream_read(stream, buf, &len));
+          SVN_ERR(svn_stream_read_full(stream, buf, &len));
           if (len > 0)
             svn_stringbuf_appendbytes(inbuf, buf, len);
         }
@@ -332,17 +332,17 @@ test_stream_seek_stringbuf(apr_pool_t *p
   stringbuf = svn_stringbuf_create("OneTwo", pool);
   stream = svn_stream_from_stringbuf(stringbuf, pool);
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "One");
   SVN_ERR(svn_stream_mark(stream, &mark, pool));
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Two");
   SVN_ERR(svn_stream_seek(stream, mark));
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[3] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Two");
 
@@ -351,7 +351,7 @@ test_stream_seek_stringbuf(apr_pool_t *p
   SVN_ERR(svn_stream_skip(stream, 2));
   /* The remaining line should be empty */
   len = 3;
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   buf[len] = '\0';
   SVN_TEST_ASSERT(len == 1);
   SVN_TEST_STRING_ASSERT(buf, "o");
@@ -381,7 +381,7 @@ test_stream_seek_translated(apr_pool_t *
                                                   FALSE, keywords, TRUE, pool);
   /* Seek from outside of keyword to inside of keyword. */
   len = 25;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 25);
   buf[25] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "One$MyKeyword: my keyword");
@@ -389,7 +389,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_reset(translated_stream));
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " was");
@@ -397,7 +397,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 2;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 2);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "as");
@@ -405,13 +405,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from inside of keyword to inside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 9;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 9);
   buf[9] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " expanded");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 9;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 9);
   buf[9] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " expanded");
@@ -419,7 +419,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 6));
   len = 3;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 3);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "ded");
@@ -427,13 +427,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from inside of keyword to outside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " $Tw");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 4;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 4);
   buf[4] = '\0';
   SVN_TEST_STRING_ASSERT(buf, " $Tw");
@@ -441,7 +441,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 2;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 2);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "Tw");
@@ -449,13 +449,13 @@ test_stream_seek_translated(apr_pool_t *
   /* Seek from outside of keyword to outside of keyword. */
   SVN_ERR(svn_stream_mark(translated_stream, &mark, pool));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 1);
   buf[1] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "o");
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 1);
   buf[1] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "o");
@@ -463,7 +463,7 @@ test_stream_seek_translated(apr_pool_t *
   SVN_ERR(svn_stream_seek(translated_stream, mark));
   SVN_ERR(svn_stream_skip(translated_stream, 2));
   len = 1;
-  SVN_ERR(svn_stream_read(translated_stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(translated_stream, buf, &len));
   SVN_TEST_ASSERT(len == 0);
   buf[len] = '\0';
   SVN_TEST_STRING_ASSERT(buf, "");
@@ -524,7 +524,7 @@ test_stream_compressed_empty_file(apr_po
                                  pool, pool));
   stream = svn_stream_compressed(empty_file_stream, pool);
   len = sizeof(buf);
-  SVN_ERR(svn_stream_read(stream, buf, &len));
+  SVN_ERR(svn_stream_read_full(stream, buf, &len));
   if (len > 0)
     return svn_error_create(SVN_ERR_TEST_FAILED, NULL,
                             "Got unexpected result.");

Modified: subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/pristine-store-test.c Mon Jan 27 23:07:57
2014
@@ -242,7 +242,7 @@ pristine_delete_while_open(const svn_tes
     char buffer[4];
     apr_size_t len = 4;
 
-    SVN_ERR(svn_stream_read(contents, buffer, &len));
+    SVN_ERR(svn_stream_read_full(contents, buffer, &len));
     SVN_TEST_ASSERT(len == 4);
     SVN_TEST_ASSERT(memcmp(buffer, data, len) == 0);
   }

Modified: subversion/trunk/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_fs.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_fs.c (original)
+++ subversion/trunk/subversion/tests/svn_test_fs.c Mon Jan 27 23:07:57 2014
@@ -282,7 +282,7 @@ svn_test__stream_to_string(svn_stringbuf
   do
     {
       len = sizeof(buf);
-      SVN_ERR(svn_stream_read(stream, buf, &len));
+      SVN_ERR(svn_stream_read_full(stream, buf, &len));
 
       /* Now copy however many bytes were *actually* read into str. */
       svn_stringbuf_appendbytes(str, buf, len);

Modified: subversion/trunk/tools/server-side/fsfs-stats.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/fsfs-stats.c?rev=1561903&r1=1561902&r2=1561903&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/fsfs-stats.c (original)
+++ subversion/trunk/tools/server-side/fsfs-stats.c Mon Jan 27 23:07:57 2014
@@ -910,7 +910,7 @@ read_windows(apr_array_header_t **window
   content->data += 3;
   content->len -= 3;
   stream = svn_stream_from_stringbuf(content, pool);
-  SVN_ERR(svn_stream_read(stream, &version, &len));
+  SVN_ERR(svn_stream_read_full(stream, &version, &len));
 
   /* read the windows from that stream */
   while (TRUE)
@@ -921,7 +921,7 @@ read_windows(apr_array_header_t **window
 
       len = sizeof(dummy);
       SVN_ERR(svn_stream_mark(stream, &mark, pool));
-      SVN_ERR(svn_stream_read(stream, &dummy, &len));
+      SVN_ERR(svn_stream_read_full(stream, &dummy, &len));
       if (len == 0)
         break;
 



Mime
View raw message