Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6BA35200B65 for ; Wed, 17 Aug 2016 18:37:20 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6A2C4160A8C; Wed, 17 Aug 2016 16:37:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8BCFF160A6C for ; Wed, 17 Aug 2016 18:37:19 +0200 (CEST) Received: (qmail 45695 invoked by uid 500); 17 Aug 2016 16:37:18 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 45684 invoked by uid 99); 17 Aug 2016 16:37:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2016 16:37:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5A1F2C85DC for ; Wed, 17 Aug 2016 16:37:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.281 X-Spam-Level: * X-Spam-Status: No, score=1.281 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.519] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ccRO7zuBbAFH for ; Wed, 17 Aug 2016 16:37:17 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id AB4545FBDE for ; Wed, 17 Aug 2016 16:37:16 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CED2FE0054 for ; Wed, 17 Aug 2016 16:37:15 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 31E8C3A0E73 for ; Wed, 17 Aug 2016 16:37:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@subversion.apache.org From: ivan@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160817163715.31E8C3A0E73@svn01-us-west.apache.org> archived-at: Wed, 17 Aug 2016 16:37:20 -0000 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 };