Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82422D57A for ; Tue, 19 Feb 2013 14:54:22 +0000 (UTC) Received: (qmail 56440 invoked by uid 500); 19 Feb 2013 14:54:21 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 56399 invoked by uid 500); 19 Feb 2013 14:54:21 -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 56371 invoked by uid 99); 19 Feb 2013 14:54:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 14:54:20 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2013 14:54:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C21D72388900; Tue, 19 Feb 2013 14:53:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1447743 - in /subversion/trunk/subversion/libsvn_wc: wc_db.c wc_db_private.h Date: Tue, 19 Feb 2013 14:53:56 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130219145356.C21D72388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stsp Date: Tue Feb 19 14:53:56 2013 New Revision: 1447743 URL: http://svn.apache.org/r1447743 Log: Expose the static fetch_repos_info wc_db function to other wc_db source files. * subversion/libsvn_wc/wc_db.c (fetch_repos_info): Rename to ... (svn_wc__db_fetch_repos_info): ... this, and drop 'static' marker. (svn_wc__db_base_get_info, svn_wc__db_base_get_children_info, svn_wc__db_external_read, db_op_copy_shadowed_layer, svn_wc__db_read_info, read_children_info, read_url_txn, svn_wc__db_global_relocate, svn_wc__db_scan_base_repos, svn_wc__db_scan_addition, has_switched_subtrees, svn_wc__db_base_get_lock_tokens_recursive): Update callers. Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c subversion/trunk/subversion/libsvn_wc/wc_db_private.h Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1447743&r1=1447742&r2=1447743&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Feb 19 14:53:56 2013 @@ -421,16 +421,12 @@ lock_from_columns(svn_sqlite__stmt_t *st } -/* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to - its root URL and UUID respectively. If REPOS_ID is INVALID_REPOS_ID, - use NULL for both URL and UUID. Either or both output parameters may be - NULL if not wanted. */ -static svn_error_t * -fetch_repos_info(const char **repos_root_url, - const char **repos_uuid, - svn_sqlite__db_t *sdb, - apr_int64_t repos_id, - apr_pool_t *result_pool) +svn_error_t * +svn_wc__db_fetch_repos_info(const char **repos_root_url, + const char **repos_uuid, + svn_sqlite__db_t *sdb, + apr_int64_t repos_id, + apr_pool_t *result_pool) { svn_sqlite__stmt_t *stmt; svn_boolean_t have_row; @@ -464,7 +460,6 @@ fetch_repos_info(const char **repos_root return svn_error_trace(svn_sqlite__reset(stmt)); } - /* Set *REPOS_ID, *REVISION and *REPOS_RELPATH from the given columns of the SQLITE statement STMT, or to NULL/SVN_INVALID_REVNUM if the respective column value is null. Any of the output parameters may be NULL if not @@ -2549,8 +2544,8 @@ svn_wc__db_base_get_info(svn_wc__db_stat wcroot, local_relpath, result_pool, scratch_pool)); SVN_ERR_ASSERT(repos_id != INVALID_REPOS_ID); - SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, - wcroot->sdb, repos_id, result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(repos_root_url, repos_uuid, + wcroot->sdb, repos_id, result_pool)); return SVN_NO_ERROR; } @@ -2604,8 +2599,8 @@ svn_wc__db_base_get_children_info(apr_ha info->lock = lock_from_columns(stmt, 8, 9, 10, 11, result_pool); - err = fetch_repos_info(&info->repos_root_url, NULL, wcroot->sdb, - repos_id, result_pool); + err = svn_wc__db_fetch_repos_info(&info->repos_root_url, NULL, + wcroot->sdb, repos_id, result_pool); if (err) return svn_error_trace( @@ -3445,8 +3440,9 @@ svn_wc__db_external_read(svn_wc__db_stat err = svn_error_compose_create( err, - fetch_repos_info(repos_root_url, repos_uuid, - wcroot->sdb, repos_id, result_pool)); + svn_wc__db_fetch_repos_info(repos_root_url, repos_uuid, + wcroot->sdb, repos_id, + result_pool)); } if (recorded_repos_relpath) @@ -4684,9 +4680,9 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr const char *repos_root_url; const char *repos_uuid; - SVN_ERR(fetch_repos_info(&repos_root_url, &repos_uuid, - src_wcroot->sdb, node_repos_id, - scratch_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(&repos_root_url, &repos_uuid, + src_wcroot->sdb, node_repos_id, + scratch_pool)); SVN_ERR(create_repos_id(&node_repos_id, repos_root_url, repos_uuid, dst_wcroot->sdb, scratch_pool)); @@ -8228,10 +8224,11 @@ svn_wc__db_read_info(svn_wc__db_status_t op_root, have_props, props_mod, have_base, have_more_work, have_work, wcroot, local_relpath, result_pool, scratch_pool)); - SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, - wcroot->sdb, repos_id, result_pool)); - SVN_ERR(fetch_repos_info(original_root_url, original_uuid, - wcroot->sdb, original_repos_id, result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(repos_root_url, repos_uuid, + wcroot->sdb, repos_id, result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(original_root_url, original_uuid, + wcroot->sdb, original_repos_id, + result_pool)); return SVN_NO_ERROR; } @@ -8336,8 +8333,10 @@ read_children_info(svn_wc__db_wcroot_t * repos_id != last_repos_id)) { last_repos_root_url = repos_root_url; - err = fetch_repos_info(&repos_root_url, &repos_uuid, - wcroot->sdb, repos_id, result_pool); + err = svn_wc__db_fetch_repos_info(&repos_root_url, + &repos_uuid, + wcroot->sdb, repos_id, + result_pool); if (err) SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt))); @@ -8936,8 +8935,8 @@ read_url_txn(const char **url, } } - SVN_ERR(fetch_repos_info(&repos_root_url, NULL, wcroot->sdb, repos_id, - scratch_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(&repos_root_url, NULL, wcroot->sdb, + repos_id, scratch_pool)); SVN_ERR_ASSERT(repos_root_url != NULL && repos_relpath != NULL); *url = svn_path_url_add_component2(repos_root_url, repos_relpath, @@ -10036,8 +10035,8 @@ svn_wc__db_global_relocate(svn_wc__db_t scratch_pool, scratch_pool)); } - SVN_ERR(fetch_repos_info(NULL, &repos_uuid, - wcroot->sdb, old_repos_id, scratch_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(NULL, &repos_uuid, wcroot->sdb, + old_repos_id, scratch_pool)); SVN_ERR_ASSERT(repos_uuid); SVN_WC__DB_WITH_TXN( @@ -11063,8 +11062,8 @@ svn_wc__db_scan_base_repos(const char ** NULL, NULL, NULL, NULL, NULL, wcroot, local_relpath, result_pool, scratch_pool)); - SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, wcroot->sdb, - repos_id, result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(repos_root_url, repos_uuid, wcroot->sdb, + repos_id, result_pool)); return SVN_NO_ERROR; } @@ -11537,11 +11536,11 @@ svn_wc__db_scan_addition(svn_wc__db_stat /* REPOS_ID must be valid if requested; ORIGINAL_REPOS_ID need not be. */ SVN_ERR_ASSERT(repos_id_p == NULL || repos_id != INVALID_REPOS_ID); - SVN_ERR(fetch_repos_info(repos_root_url, repos_uuid, wcroot->sdb, - repos_id, result_pool)); - SVN_ERR(fetch_repos_info(original_root_url, original_uuid, - wcroot->sdb, original_repos_id, - result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(repos_root_url, repos_uuid, wcroot->sdb, + repos_id, result_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(original_root_url, original_uuid, + wcroot->sdb, original_repos_id, + result_pool)); if (moved_from_abspath) { @@ -14008,8 +14007,8 @@ has_switched_subtrees(svn_boolean_t *is_ does not match the given trailing URL then the whole working copy is switched. */ - SVN_ERR(fetch_repos_info(&repos_root_url, NULL, wcroot->sdb, repos_id, - scratch_pool)); + SVN_ERR(svn_wc__db_fetch_repos_info(&repos_root_url, NULL, wcroot->sdb, + repos_id, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, repos_relpath, scratch_pool); @@ -14424,9 +14423,10 @@ svn_wc__db_base_get_lock_tokens_recursiv if (child_repos_id != last_repos_id) { - svn_error_t *err = fetch_repos_info(&last_repos_root_url, NULL, - wcroot->sdb, child_repos_id, - scratch_pool); + svn_error_t *err = svn_wc__db_fetch_repos_info(&last_repos_root_url, + NULL, wcroot->sdb, + child_repos_id, + scratch_pool); if (err) { Modified: subversion/trunk/subversion/libsvn_wc/wc_db_private.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_private.h?rev=1447743&r1=1447742&r2=1447743&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/wc_db_private.h (original) +++ subversion/trunk/subversion/libsvn_wc/wc_db_private.h Tue Feb 19 14:53:56 2013 @@ -299,6 +299,17 @@ svn_wc__db_depth_get_info(svn_wc__db_sta apr_pool_t *result_pool, apr_pool_t *scratch_pool); +/* Look up REPOS_ID in SDB and set *REPOS_ROOT_URL and/or *REPOS_UUID to + its root URL and UUID respectively. If REPOS_ID is INVALID_REPOS_ID, + use NULL for both URL and UUID. Either or both output parameters may be + NULL if not wanted. */ +svn_error_t * +svn_wc__db_fetch_repos_info(const char **repos_root_url, + const char **repos_uuid, + svn_sqlite__db_t *sdb, + apr_int64_t repos_id, + apr_pool_t *result_pool); + /* Like svn_wc__db_read_conflict(), but with WCROOT+LOCAL_RELPATH instead of DB+LOCAL_ABSPATH, and outputting relpaths instead of abspaths. */ svn_error_t *