You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/05/03 22:38:17 UTC
svn commit: r940608 - in /subversion/trunk/subversion: include/private/
libsvn_client/ libsvn_wc/
Author: cmpilato
Date: Mon May 3 20:38:16 2010
New Revision: 940608
URL: http://svn.apache.org/viewvc?rev=940608&view=rev
Log:
Expand svn_wc__node_get_repos_info() to be able to (optionally)
populate repos info for deleted nodes, too.
* subversion/include/private/svn_wc_private.h,
* subversion/libsvn_wc/node.c
(svn_wc__node_get_repos_info): Add 'scan_deleted' parameter and handling.
* subversion/libsvn_client/externals.c,
* subversion/libsvn_client/merge.c,
* subversion/libsvn_client/mergeinfo.c,
* subversion/libsvn_client/ra.c,
* subversion/libsvn_client/util.c,
* subversion/libsvn_wc/update_editor.c
Update calls to svn_wc__node_get_repos_info(), passing FALSE for
'scan_deleted'.
* subversion/libsvn_client/info.c
Update call to svn_wc__node_get_repos_info(), passing TRUE for
'scan_deleted'.
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/libsvn_client/info.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/mergeinfo.c
subversion/trunk/subversion/libsvn_client/ra.c
subversion/trunk/subversion/libsvn_client/util.c
subversion/trunk/subversion/libsvn_wc/node.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Mon May 3 20:38:16 2010
@@ -281,6 +281,10 @@ svn_wc__node_get_children(const apr_arra
* and/or UUID of added nodes. Otherwise set @a *repos_root_url and
* *repos_uuid to NULL for added nodes.
*
+ * If @a scan_deleted is TRUE, then scan the base information to find
+ * the (former) repos root and/or UUID of deleted nodes. Otherwise set
+ * @a *repos_root_url and *repos_uuid to NULL for deleted nodes.
+ *
* Either input value may be NULL, indicating no interest.
*/
svn_error_t *
@@ -289,6 +293,7 @@ svn_wc__node_get_repos_info(const char *
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t scan_added,
+ svn_boolean_t scan_deleted,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Mon May 3 20:38:16 2010
@@ -209,7 +209,7 @@ switch_dir_external(const char *path,
SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, NULL,
ctx->wc_ctx, local_abspath,
- FALSE, pool, subpool));
+ FALSE, FALSE, pool, subpool));
if (repos_root_url)
{
/* URLs don't match. Try to relocate (if necessary) and then
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Mon May 3 20:38:16 2010
@@ -103,10 +103,14 @@ build_info_for_entry(svn_info_t **info,
SVN_ERR(svn_wc_read_kind(&tmpinfo->kind, wc_ctx, local_abspath, TRUE, pool));
SVN_ERR(svn_wc__node_get_url(&tmpinfo->URL, wc_ctx, local_abspath,
pool, pool));
+
+ /* WC-1 returned repos UUID's and root URLs for schedule-deleted
+ stuff, too. */
SVN_ERR(svn_wc__node_get_repos_info(&tmpinfo->repos_root_URL,
&tmpinfo->repos_UUID,
- wc_ctx, local_abspath, TRUE,
+ wc_ctx, local_abspath, TRUE, TRUE,
pool, pool));
+
SVN_ERR(svn_wc__node_get_changed_info(&tmpinfo->last_changed_rev,
&tmpinfo->last_changed_date,
&tmpinfo->last_changed_author,
@@ -347,7 +351,7 @@ info_found_node_callback(const char *loc
SVN_ERR(svn_wc__node_get_repos_info(&(info->repos_root_URL),
NULL,
fe_baton->wc_ctx,
- local_abspath, FALSE,
+ local_abspath, FALSE, FALSE,
pool, pool));
}
else
@@ -411,7 +415,7 @@ crawl_entries(const char *local_abspath,
SVN_ERR(svn_wc__node_get_repos_info(&(info->repos_root_URL),
NULL,
ctx->wc_ctx,
- local_abspath, FALSE,
+ local_abspath, FALSE, FALSE,
pool, pool));
SVN_ERR(receiver(receiver_baton, local_abspath, info, pool));
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon May 3 20:38:16 2010
@@ -7427,10 +7427,8 @@ remove_noop_subtree_ranges(const char *u
SVN_ERR(svn_wc__node_get_repos_info(&repos_root_url, NULL,
merge_b->ctx->wc_ctx,
- merge_b->target_abspath,
- FALSE,
- scratch_pool,
- scratch_pool));
+ merge_b->target_abspath, FALSE, FALSE,
+ scratch_pool, scratch_pool));
/* Set up the log baton. */
log_gap_baton.merge_b = merge_b;
Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Mon May 3 20:38:16 2010
@@ -381,7 +381,7 @@ svn_client__get_wc_mergeinfo_catalog(svn
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
*mergeinfo_cat = NULL;
SVN_ERR(svn_wc__node_get_repos_info(&repos_root, NULL,
- ctx->wc_ctx, local_abspath, TRUE,
+ ctx->wc_ctx, local_abspath, TRUE, FALSE,
scratch_pool, scratch_pool));
if (!repos_root)
{
@@ -563,7 +563,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
SVN_ERR(svn_wc__node_is_added(&is_added, ctx->wc_ctx, local_abspath,
scratch_pool));
SVN_ERR(svn_wc__node_get_repos_info(&repos_root, NULL,
- ctx->wc_ctx, local_abspath, FALSE,
+ ctx->wc_ctx, local_abspath, FALSE, FALSE,
scratch_pool, scratch_pool));
/* We may get an entry with abbreviated information from TARGET_WCPATH's
Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Mon May 3 20:38:16 2010
@@ -326,7 +326,7 @@ svn_client__open_ra_session_internal(svn
SVN_ERR(svn_dirent_get_absolute(&base_dir_abspath, base_dir, pool));
err = svn_wc__node_get_repos_info(NULL, &uuid, ctx->wc_ctx,
- base_dir_abspath, FALSE,
+ base_dir_abspath, FALSE, FALSE,
pool, pool);
if (err && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
@@ -389,7 +389,7 @@ svn_client_uuid_from_path2(const char **
{
return svn_error_return(
svn_wc__node_get_repos_info(NULL, uuid, ctx->wc_ctx, local_abspath,
- FALSE, result_pool, scratch_pool));
+ FALSE, FALSE, result_pool, scratch_pool));
}
Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Mon May 3 20:38:16 2010
@@ -159,7 +159,7 @@ wc_path_to_repos_urls(const char **url,
need a fallback plan. */
if (*repos_root == NULL)
SVN_ERR(svn_wc__node_get_repos_info(repos_root, NULL, wc_ctx,
- local_abspath, TRUE,
+ local_abspath, TRUE, FALSE,
result_pool, scratch_pool));
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Mon May 3 20:38:16 2010
@@ -106,6 +106,7 @@ svn_wc__node_get_repos_info(const char *
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t scan_added,
+ svn_boolean_t scan_deleted,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -157,7 +158,9 @@ svn_wc__node_get_repos_info(const char *
|| status == svn_wc__db_status_obstructed
|| status == svn_wc__db_status_absent
|| status == svn_wc__db_status_excluded
- || status == svn_wc__db_status_not_present))
+ || status == svn_wc__db_status_not_present
+ || (scan_deleted && (status == svn_wc__db_status_deleted))
+ || (scan_deleted && (status == svn_wc__db_status_obstructed_delete))))
{
SVN_ERR(svn_wc__db_scan_base_repos(NULL, repos_root_url, repos_uuid,
wc_ctx->db, local_abspath,
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=940608&r1=940607&r2=940608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon May 3 20:38:16 2010
@@ -5222,7 +5222,7 @@ make_editor(svn_revnum_t *target_revisio
/* Get the anchor entry, so we can fetch the repository root. */
SVN_ERR(svn_wc__node_get_repos_info(&repos_root, &repos_uuid, wc_ctx,
- anchor_abspath, TRUE,
+ anchor_abspath, TRUE, FALSE,
result_pool, scratch_pool));
/* With WC-NG we need a valid repository root */
@@ -5794,7 +5794,7 @@ svn_wc_add_repos_file4(svn_wc_context_t
/* Find the repository_root via the parent directory, which
is always versioned before this function is called */
SVN_ERR(svn_wc__node_get_repos_info(&repos_root, NULL, wc_ctx,
- dir_abspath, TRUE, pool, pool));
+ dir_abspath, TRUE, FALSE, pool, pool));
if (copyfrom_url && !svn_uri_is_ancestor(repos_root, copyfrom_url))
return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,