You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/05/03 23:49:16 UTC
svn commit: r1099275 - in /subversion/trunk/subversion/libsvn_wc: info.c
node.c wc.h
Author: hwright
Date: Tue May 3 21:49:16 2011
New Revision: 1099275
URL: http://svn.apache.org/viewvc?rev=1099275&view=rev
Log:
Add a library-internal version of svn_wc__node_get_origin(), and use it for
fetching info.
* subversion/libsvn_wc/wc.h
(svn_wc__internal_get_origin): New.
* subversion/libsvn_wc/info.c
(build_info_for_entry): Use the internal version.
* subversion/libsvn_wc/node.c
(svn_wc__internal_get_origin): New.
(svn_wc__node_get_origin): Impliment as a wrapper around the internal
function.
Modified:
subversion/trunk/subversion/libsvn_wc/info.c
subversion/trunk/subversion/libsvn_wc/node.c
subversion/trunk/subversion/libsvn_wc/wc.h
Modified: subversion/trunk/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/info.c?rev=1099275&r1=1099274&r2=1099275&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/info.c (original)
+++ subversion/trunk/subversion/libsvn_wc/info.c Tue May 3 21:49:16 2011
@@ -78,11 +78,11 @@ build_info_for_entry(svn_info2_t **info,
tmpinfo->wc_info = apr_pcalloc(result_pool, sizeof(*tmpinfo->wc_info));
- SVN_ERR(svn_wc__node_get_origin(&is_copy, &rev, &repos_relpath,
- &tmpinfo->repos_root_URL,
- &tmpinfo->repos_UUID,
- wc_ctx, local_abspath, TRUE,
- result_pool, scratch_pool));
+ SVN_ERR(svn_wc__internal_get_origin(&is_copy, &rev, &repos_relpath,
+ &tmpinfo->repos_root_URL,
+ &tmpinfo->repos_UUID,
+ wc_ctx->db, local_abspath, TRUE,
+ result_pool, scratch_pool));
/* If we didn't get an origin, get it directly */
if (!tmpinfo->repos_root_URL)
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1099275&r1=1099274&r2=1099275&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Tue May 3 21:49:16 2011
@@ -1361,16 +1361,16 @@ svn_wc__get_absent_subtrees(apr_hash_t *
}
svn_error_t *
-svn_wc__node_get_origin(svn_boolean_t *is_copy,
- svn_revnum_t *revision,
- const char **repos_relpath,
- const char **repos_root_url,
- const char **repos_uuid,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- svn_boolean_t scan_deleted,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_wc__internal_get_origin(svn_boolean_t *is_copy,
+ svn_revnum_t *revision,
+ const char **repos_relpath,
+ const char **repos_root_url,
+ const char **repos_uuid,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_boolean_t scan_deleted,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
const char *original_repos_relpath;
const char *original_repos_root_url;
@@ -1391,8 +1391,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
&original_repos_uuid, &original_revision,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, is_copy,
- wc_ctx->db, local_abspath,
- result_pool, scratch_pool));
+ db, local_abspath, result_pool, scratch_pool));
if (*repos_relpath)
{
@@ -1430,8 +1429,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
svn_boolean_t have_base;
/* Is this a BASE or a WORKING delete? */
SVN_ERR(svn_wc__db_info_below_working(&have_base, &scan_working,
- &status,
- wc_ctx->db, local_abspath,
+ &status, db, local_abspath,
scratch_pool));
}
@@ -1443,8 +1441,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
NULL, NULL, &original_repos_relpath,
repos_root_url,
repos_uuid,
- revision,
- wc_ctx->db, local_abspath,
+ revision, db, local_abspath,
result_pool, scratch_pool));
if (status == svn_wc__db_status_added)
@@ -1465,7 +1462,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
repos_root_url, repos_uuid, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL,
- wc_ctx->db, local_abspath,
+ db, local_abspath,
result_pool, scratch_pool));
}
@@ -1474,6 +1471,24 @@ svn_wc__node_get_origin(svn_boolean_t *i
}
svn_error_t *
+svn_wc__node_get_origin(svn_boolean_t *is_copy,
+ svn_revnum_t *revision,
+ const char **repos_relpath,
+ const char **repos_root_url,
+ const char **repos_uuid,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t scan_deleted,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_return(svn_wc__internal_get_origin(is_copy, revision,
+ repos_relpath, repos_root_url, repos_uuid,
+ wc_ctx->db, local_abspath, scan_deleted,
+ result_pool, scratch_pool));
+}
+
+svn_error_t *
svn_wc__node_get_commit_status(svn_node_kind_t *kind,
svn_boolean_t *added,
svn_boolean_t *deleted,
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1099275&r1=1099274&r2=1099275&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Tue May 3 21:49:16 2011
@@ -643,6 +643,18 @@ svn_wc__internal_get_copyfrom_info(const
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* Internal version of svn_wc__node_get_origin() */
+svn_error_t *
+svn_wc__internal_get_origin(svn_boolean_t *is_copy,
+ svn_revnum_t *revision,
+ const char **repos_relpath,
+ const char **repos_root_url,
+ const char **repos_uuid,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_boolean_t scan_deleted,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* Upgrade the wc sqlite database given in SDB for the wc located at