subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1756651 - in /subversion/trunk/subversion: include/svn_io.h libsvn_fs/fs-loader.c libsvn_subr/io.c libsvn_subr/stream.c tests/libsvn_fs/fs-test.c tests/libsvn_subr/stream-test.c
Date Wed, 17 Aug 2016 16:37:14 GMT
Author: ivan
Date: Wed Aug 17 16:37:14 2016
New Revision: 1756651

URL: http://svn.apache.org/viewvc?rev=1756651&view=rev
Log:
Follow-up to r1755486: Rename svn_stream_checksum() to
svn_stream_contents_checksum().

Suggested by: danielsh

* subversion/include/svn_io.h
* subversion/libsvn_subr/stream.c
  (svn_stream_checksum): Rename to svn_stream_contents_checksum().
  (compute_stream_checksum): Update docstring.

* subversion/libsvn_fs/fs-loader.c
* subversion/libsvn_subr/io.c
* subversion/tests/libsvn_fs/fs-test.c
* subversion/tests/libsvn_subr/stream-test.c
  (svn_fs_file_checksum, svn_io_file_checksum2, get_file_checksum,
   test_stream_checksum): Adapt callers.

Modified:
    subversion/trunk/subversion/include/svn_io.h
    subversion/trunk/subversion/libsvn_fs/fs-loader.c
    subversion/trunk/subversion/libsvn_subr/io.c
    subversion/trunk/subversion/libsvn_subr/stream.c
    subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
    subversion/trunk/subversion/tests/libsvn_subr/stream-test.c

Modified: subversion/trunk/subversion/include/svn_io.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_io.h?rev=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_io.h (original)
+++ subversion/trunk/subversion/include/svn_io.h Wed Aug 17 16:37:14 2016
@@ -1266,11 +1266,11 @@ svn_stream_checksummed(svn_stream_t *str
  * @since New in 1.10.
  */
 svn_error_t *
-svn_stream_checksum(svn_checksum_t **checksum,
-                    svn_stream_t *stream,
-                    svn_checksum_kind_t kind,
-                    apr_pool_t *result_pool,
-                    apr_pool_t *scratch_pool);
+svn_stream_contents_checksum(svn_checksum_t **checksum,
+                             svn_stream_t *stream,
+                             svn_checksum_kind_t kind,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
 
 /** Read from a generic stream until @a buffer is filled upto @a *len or
  * until EOF is reached. @see svn_stream_t

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Wed Aug 17 16:37:14 2016
@@ -1504,7 +1504,8 @@ svn_fs_file_checksum(svn_checksum_t **ch
       svn_stream_t *contents;
 
       SVN_ERR(svn_fs_file_contents(&contents, root, path, pool));
-      SVN_ERR(svn_stream_checksum(checksum, contents, kind, pool, pool));
+      SVN_ERR(svn_stream_contents_checksum(checksum, contents, kind,
+                                           pool, pool));
     }
 
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Wed Aug 17 16:37:14 2016
@@ -1482,7 +1482,8 @@ svn_io_file_checksum2(svn_checksum_t **c
 
   SVN_ERR(svn_io_file_open(&f, file, APR_READ, APR_OS_DEFAULT, pool));
   file_stream = svn_stream_from_aprfile2(f, FALSE, pool);
-  SVN_ERR(svn_stream_checksum(checksum, file_stream, kind, pool, pool));
+  SVN_ERR(svn_stream_contents_checksum(checksum, file_stream, kind,
+                                       pool, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/stream.c?rev=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/stream.c (original)
+++ subversion/trunk/subversion/libsvn_subr/stream.c Wed Aug 17 16:37:14 2016
@@ -1478,8 +1478,8 @@ svn_stream_checksummed2(svn_stream_t *st
   return s;
 }
 
-/* Helper for svn_stream_checksum() to compute checksum of KIND of STREAM.
- * This function doesn't close source stream. */
+/* Helper for svn_stream_contents_checksum() to compute checksum of
+ * KIND of STREAM. This function doesn't close source stream. */
 static svn_error_t *
 compute_stream_checksum(svn_checksum_t **checksum,
                         svn_stream_t *stream,
@@ -1508,11 +1508,11 @@ compute_stream_checksum(svn_checksum_t *
 }
 
 svn_error_t *
-svn_stream_checksum(svn_checksum_t **checksum,
-                    svn_stream_t *stream,
-                    svn_checksum_kind_t kind,
-                    apr_pool_t *result_pool,
-                    apr_pool_t *scratch_pool)
+svn_stream_contents_checksum(svn_checksum_t **checksum,
+                             svn_stream_t *stream,
+                             svn_checksum_kind_t kind,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
 {
   svn_error_t *err;
 

Modified: subversion/trunk/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_fs/fs-test.c?rev=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_fs/fs-test.c Wed Aug 17 16:37:14 2016
@@ -3596,7 +3596,8 @@ get_file_checksum(svn_checksum_t **check
 
   /* Get a stream for the file contents. */
   SVN_ERR(svn_fs_file_contents(&stream, root, path, pool));
-  SVN_ERR(svn_stream_checksum(checksum, stream, checksum_kind, pool, pool));
+  SVN_ERR(svn_stream_contents_checksum(checksum, stream, checksum_kind,
+                                       pool, pool));
 
   return SVN_NO_ERROR;
 }

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=1756651&r1=1756650&r2=1756651&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/stream-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/stream-test.c Wed Aug 17 16:37:14 2016
@@ -855,13 +855,15 @@ test_stream_checksum(apr_pool_t *pool)
     svn_string_create("The quick brown fox jumps over the lazy dog", pool);
   svn_checksum_t *actual;
 
-  SVN_ERR(svn_stream_checksum(&actual, svn_stream_from_string(str, pool),
-                              svn_checksum_md5, pool, pool));
+  SVN_ERR(svn_stream_contents_checksum(&actual,
+                                       svn_stream_from_string(str, pool),
+                                       svn_checksum_md5, pool, pool));
   SVN_TEST_STRING_ASSERT("9e107d9d372bb6826bd81d3542a419d6",
                          svn_checksum_to_cstring(actual, pool));
 
-  SVN_ERR(svn_stream_checksum(&actual, svn_stream_from_string(str, pool),
-                              svn_checksum_sha1, pool, pool));
+  SVN_ERR(svn_stream_contents_checksum(&actual,
+                                       svn_stream_from_string(str, pool),
+                                       svn_checksum_sha1, pool, pool));
   SVN_TEST_STRING_ASSERT("2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
                          svn_checksum_to_cstring(actual, pool));
 
@@ -900,7 +902,7 @@ static struct svn_test_descriptor_t test
     SVN_TEST_PASS2(test_stream_compressed_read_full,
                    "test compression for streams without partial read"),
     SVN_TEST_PASS2(test_stream_checksum,
-                   "test svn_stream_checksum()"),
+                   "test svn_stream_contents_checksum()"),
     SVN_TEST_NULL
   };
 



Mime
View raw message