You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/25 01:00:36 UTC
svn commit: r1449565 - in /subversion/trunk/subversion/libsvn_client: cat.c
cmdline.c commit.c commit_util.c copy_foreign.c diff.c externals.c merge.c
ra.c status.c switch.c update.c upgrade.c
Author: rhuijben
Date: Mon Feb 25 00:00:35 2013
New Revision: 1449565
URL: http://svn.apache.org/r1449565
Log:
Replace some deprecated calls in libsvn_client with calls to the
newer functions.
* subversion/libsvn_client/cat.c
(svn_client__get_normalized_stream): Update caller.
* subversion/libsvn_client/cmdline.c
(svn_client_args_to_target_array2): Update caller.
* subversion/libsvn_client/commit.c
(check_nonrecursive_dir_delete): Update caller.
* subversion/libsvn_client/commit_util.c
(harvest_not_present_for_copy): Update caller.
* subversion/libsvn_client/copy_foreign.c
(svn_client__copy_foreign): Update caller.
* subversion/libsvn_client/diff.c
(diff_wc_wc,
diff_repos_wc,
diff_summarize_wc_wc): Update caller.
* subversion/libsvn_client/externals.c
(switch_file_external,
handle_external_item_removal,
svn_client__handle_externals): Update caller.
* subversion/libsvn_client/merge.c
(insert_parent_and_sibs_of_sw_absent_del_subtree,
get_mergeinfo_paths,
log_find_operative_subtree_revs,
flag_subtrees_needing_mergeinfo,
record_mergeinfo_for_added_subtrees,
ensure_wc_is_suitable_merge_target,
get_target_and_lock_abspath): Update caller.
* subversion/libsvn_client/ra.c
(svn_client__ra_get_copysrc_kind): Update caller.
* subversion/libsvn_client/status.c
(svn_client_status5): Update caller.
* subversion/libsvn_client/switch.c
(switch_internal): Update caller.
* subversion/libsvn_client/update.c
(update_internal): Update caller.
* subversion/libsvn_client/upgrade.c
(svn_client_upgrade): Update caller.
Modified:
subversion/trunk/subversion/libsvn_client/cat.c
subversion/trunk/subversion/libsvn_client/cmdline.c
subversion/trunk/subversion/libsvn_client/commit.c
subversion/trunk/subversion/libsvn_client/commit_util.c
subversion/trunk/subversion/libsvn_client/copy_foreign.c
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/ra.c
subversion/trunk/subversion/libsvn_client/status.c
subversion/trunk/subversion/libsvn_client/switch.c
subversion/trunk/subversion/libsvn_client/update.c
subversion/trunk/subversion/libsvn_client/upgrade.c
Modified: subversion/trunk/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cat.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cat.c (original)
+++ subversion/trunk/subversion/libsvn_client/cat.c Mon Feb 25 00:00:35 2013
@@ -67,7 +67,9 @@ svn_client__get_normalized_stream(svn_st
SVN_ERR_ASSERT(SVN_CLIENT__REVKIND_IS_LOCAL_TO_WC(revision->kind));
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, local_abspath, FALSE, scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, local_abspath,
+ (revision->kind != svn_opt_revision_working),
+ FALSE, scratch_pool));
if (kind == svn_node_unknown || kind == svn_node_none)
return svn_error_createf(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
Modified: subversion/trunk/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cmdline.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cmdline.c (original)
+++ subversion/trunk/subversion/libsvn_client/cmdline.c Mon Feb 25 00:00:35 2013
@@ -244,8 +244,8 @@ svn_client_args_to_target_array2(apr_arr
SVN_ERR(svn_dirent_get_absolute(&target_abspath,
original_target, pool));
- err2 = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
- FALSE, pool);
+ err2 = svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
+ TRUE, FALSE, pool);
if (err2
&& (err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
|| err2->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED))
Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Mon Feb 25 00:00:35 2013
@@ -256,8 +256,8 @@ check_nonrecursive_dir_delete(svn_wc_con
SVN_ERR_ASSERT(depth != svn_depth_infinity);
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, target_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, target_abspath,
+ TRUE, FALSE, scratch_pool));
/* ### TODO(sd): This check is slightly too strict. It should be
Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Mon Feb 25 00:00:35 2013
@@ -525,8 +525,8 @@ harvest_not_present_for_copy(svn_wc_cont
continue; /* This node can't be deleted */
}
else
- SVN_ERR(svn_wc_read_kind(&kind, wc_ctx, this_abspath, TRUE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, this_abspath,
+ TRUE, TRUE, scratch_pool));
SVN_ERR(add_committable(committables, this_abspath, kind,
repos_root_url,
Modified: subversion/trunk/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy_foreign.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy_foreign.c Mon Feb 25 00:00:35 2013
@@ -492,8 +492,8 @@ svn_client__copy_foreign(const char *url
}
dir_abspath = svn_dirent_dirname(dst_abspath, scratch_pool);
- SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, dir_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, dir_abspath,
+ FALSE, FALSE, scratch_pool));
if (wc_kind == svn_node_none)
{
@@ -501,8 +501,8 @@ svn_client__copy_foreign(const char *url
SVN_ERR(svn_client__make_local_parents(dir_abspath, make_parents, ctx,
scratch_pool));
- SVN_ERR(svn_wc_read_kind(&wc_kind, ctx->wc_ctx, dir_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&wc_kind, ctx->wc_ctx, dir_abspath,
+ FALSE, FALSE, scratch_pool));
}
if (wc_kind != svn_node_dir)
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Mon Feb 25 00:00:35 2013
@@ -1620,7 +1620,8 @@ diff_wc_wc(const char *path1,
callback_baton->revnum2 = SVN_INVALID_REVNUM; /* WC */
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, abspath1, FALSE, pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, abspath1,
+ TRUE, FALSE, pool));
if (kind != svn_node_dir)
callback_baton->anchor = svn_dirent_dirname(path1, pool);
@@ -1888,7 +1889,8 @@ diff_repos_wc(const char *path_or_url1,
SVN_ERR(svn_ra_check_path(ra_session, "", rev, &kind1, pool));
/* Figure out the node kind of the local target. */
- SVN_ERR(svn_wc_read_kind(&kind2, ctx->wc_ctx, abspath2, FALSE, pool));
+ SVN_ERR(svn_wc_read_kind2(&kind2, ctx->wc_ctx, abspath2,
+ TRUE, FALSE, pool));
cmd_baton->ra_session = ra_session;
cmd_baton->anchor = anchor;
@@ -2200,7 +2202,8 @@ diff_summarize_wc_wc(svn_client_diff_sum
/* Find the node kind of PATH1 so that we know whether the diff drive will
be anchored at PATH1 or its parent dir. */
SVN_ERR(svn_dirent_get_absolute(&abspath1, path1, pool));
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, abspath1, FALSE, pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, abspath1,
+ TRUE, FALSE, pool));
target1 = (kind == svn_node_dir) ? "" : svn_dirent_basename(path1, pool);
SVN_ERR(svn_client__get_diff_summarize_callbacks(
&callbacks, &callback_baton, target1, FALSE,
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Mon Feb 25 00:00:35 2013
@@ -416,8 +416,8 @@ switch_file_external(const char *local_a
scratch_pool));
}
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, local_abspath,
+ TRUE, FALSE, scratch_pool));
SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL, NULL,
ctx->wc_ctx, local_abspath, local_abspath,
@@ -500,10 +500,13 @@ switch_file_external(const char *local_a
/* Tell RA to do an update of URL+TARGET to REVISION; if we pass an
invalid revnum, that means RA will use the latest revision. */
- SVN_ERR(svn_ra_do_switch2(ra_session, &reporter, &report_baton,
+ SVN_ERR(svn_ra_do_switch3(ra_session, &reporter, &report_baton,
switch_loc->rev,
target, svn_depth_unknown, url,
- switch_editor, switch_baton, scratch_pool));
+ FALSE /* send_copyfrom */,
+ TRUE /* ignore_ancestry */,
+ switch_editor, switch_baton,
+ scratch_pool, scratch_pool));
SVN_ERR(svn_wc__crawl_file_external(ctx->wc_ctx, local_abspath,
reporter, report_baton,
@@ -606,7 +609,7 @@ handle_external_item_removal(const svn_c
local_abspath, FALSE,
scratch_pool, scratch_pool));
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, local_abspath, FALSE,
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, local_abspath, TRUE, FALSE,
scratch_pool));
if (external_kind != kind)
@@ -1019,8 +1022,8 @@ svn_client__handle_externals(apr_hash_t
svn_node_kind_t kind;
parent_abspath = svn_dirent_dirname(parent_abspath, iterpool);
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, parent_abspath, FALSE,
- iterpool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, parent_abspath,
+ TRUE, FALSE, iterpool));
if (kind == svn_node_none)
{
svn_error_t *err;
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Feb 25 00:00:35 2013
@@ -5976,9 +5976,9 @@ insert_parent_and_sibs_of_sw_absent_del_
{
svn_node_kind_t child_kind;
- SVN_ERR(svn_wc_read_kind(&child_kind,
- ctx->wc_ctx,
- child_abspath, FALSE, iterpool));
+ SVN_ERR(svn_wc_read_kind2(&child_kind,
+ ctx->wc_ctx, child_abspath,
+ FALSE, FALSE, iterpool));
if (child_kind != svn_node_file)
continue;
}
@@ -6447,10 +6447,9 @@ get_mergeinfo_paths(apr_array_header_t *
svn_node_kind_t immediate_child_kind;
svn_pool_clear(iterpool);
- SVN_ERR(svn_wc_read_kind(&immediate_child_kind,
- ctx->wc_ctx,
- immediate_child_abspath, FALSE,
- iterpool));
+ SVN_ERR(svn_wc_read_kind2(&immediate_child_kind,
+ ctx->wc_ctx, immediate_child_abspath,
+ FALSE, FALSE, iterpool));
if ((immediate_child_kind == svn_node_dir
&& depth == svn_depth_immediates)
|| (immediate_child_kind == svn_node_file
@@ -6547,10 +6546,9 @@ get_mergeinfo_paths(apr_array_header_t *
if (depth == svn_depth_files)
{
svn_node_kind_t child_kind;
- SVN_ERR(svn_wc_read_kind(&child_kind,
- ctx->wc_ctx,
- child_abspath, FALSE,
- iterpool));
+ SVN_ERR(svn_wc_read_kind2(&child_kind,
+ ctx->wc_ctx, child_abspath,
+ FALSE, FALSE, iterpool));
if (child_kind != svn_node_file)
continue;
}
@@ -7877,15 +7875,9 @@ log_find_operative_subtree_revs(void *ba
svn_dirent_join(log_baton->merge_target_abspath,
rel_path, iterpool);
- /* ### ptb - svn_wc_read_kind is very tolerant when we ask
- ### it about unversioned, non-existent, and missing WC
- ### paths, simply setting *NODE_KIND svn_kind_none in
- ### those cases. Is there any legitimate error we
- ### might encounter during a merge where we'd want
- ### to clear the error and continue? */
- SVN_ERR(svn_wc_read_kind(&node_kind, log_baton->wc_ctx,
- wc_child_abspath, FALSE,
- iterpool));
+ SVN_ERR(svn_wc_read_kind2(&node_kind, log_baton->wc_ctx,
+ wc_child_abspath, FALSE, FALSE,
+ iterpool));
}
else
{
@@ -8145,8 +8137,8 @@ flag_subtrees_needing_mergeinfo(svn_bool
/* We need to record mergeinfo, but should that mergeinfo be
non-inheritable? */
svn_node_kind_t path_kind;
- SVN_ERR(svn_wc_read_kind(&path_kind, merge_b->ctx->wc_ctx,
- child->abspath, FALSE, iterpool));
+ SVN_ERR(svn_wc_read_kind2(&path_kind, merge_b->ctx->wc_ctx,
+ child->abspath, FALSE, FALSE, iterpool));
/* Only directories can have non-inheritable mergeinfo. */
if (path_kind == svn_node_dir)
@@ -8563,8 +8555,8 @@ record_mergeinfo_for_added_subtrees(
const char *added_path_mergeinfo_fspath;
svn_client__pathrev_t *added_path_pathrev;
- SVN_ERR(svn_wc_read_kind(&added_path_kind, merge_b->ctx->wc_ctx,
- added_abspath, FALSE, iterpool));
+ SVN_ERR(svn_wc_read_kind2(&added_path_kind, merge_b->ctx->wc_ctx,
+ added_abspath, FALSE, FALSE, iterpool));
/* Calculate the naive mergeinfo describing the merge. */
merge_mergeinfo = apr_hash_make(iterpool);
@@ -9960,8 +9952,8 @@ ensure_wc_is_suitable_merge_target(const
_("Path '%s' does not exist"),
svn_dirent_local_style(target_abspath,
scratch_pool));
- SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, target_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, target_abspath,
+ FALSE, FALSE, scratch_pool));
if (target_kind != svn_node_dir && target_kind != svn_node_file)
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
_("Merge target '%s' does not exist in the "
@@ -10329,8 +10321,8 @@ get_target_and_lock_abspath(const char *
svn_node_kind_t kind;
SVN_ERR(svn_dirent_get_absolute(target_abspath, target_wcpath,
result_pool));
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, *target_abspath, FALSE,
- result_pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, *target_abspath,
+ FALSE, FALSE, result_pool));
if (kind == svn_node_dir)
*lock_abspath = *target_abspath;
else
Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Mon Feb 25 00:00:35 2013
@@ -1109,8 +1109,8 @@ svn_client__ra_get_copysrc_kind(svn_kind
/* ### what to do with SRC_REVISION? */
- SVN_ERR(svn_wc_read_kind(&node_kind, reb->wc_ctx, local_abspath, FALSE,
- scratch_pool));
+ SVN_ERR(svn_wc_read_kind2(&node_kind, reb->wc_ctx, local_abspath,
+ FALSE, FALSE, scratch_pool));
*kind = svn__kind_from_node_kind(node_kind, FALSE);
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Mon Feb 25 00:00:35 2013
@@ -375,8 +375,8 @@ svn_client_status5(svn_revnum_t *result_
svn_node_kind_t kind;
- SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE,
- pool));
+ SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
+ TRUE, FALSE, pool));
/* Dir must be a working copy directory or the status editor fails */
if (kind == svn_node_dir)
@@ -398,8 +398,8 @@ svn_client_status5(svn_revnum_t *result_
}
else
{
- err = svn_wc_read_kind(&kind, ctx->wc_ctx, dir_abspath, FALSE,
- pool);
+ err = svn_wc_read_kind2(&kind, ctx->wc_ctx, dir_abspath,
+ FALSE, FALSE, pool);
svn_error_clear(err);
Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Mon Feb 25 00:00:35 2013
@@ -168,8 +168,8 @@ switch_internal(svn_revnum_t *result_rev
return SVN_NO_ERROR;
}
- SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, local_abspath, TRUE,
- pool));
+ SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath,
+ TRUE, TRUE, pool));
if (target_kind == svn_node_dir)
SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth,
Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Mon Feb 25 00:00:35 2013
@@ -293,8 +293,8 @@ update_internal(svn_revnum_t *result_rev
return SVN_NO_ERROR;
}
- SVN_ERR(svn_wc_read_kind(&target_kind, ctx->wc_ctx, local_abspath, TRUE,
- pool));
+ SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath,
+ TRUE, TRUE, pool));
if (target_kind == svn_node_dir)
{
SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth,
Modified: subversion/trunk/subversion/libsvn_client/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/upgrade.c?rev=1449565&r1=1449564&r2=1449565&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_client/upgrade.c Mon Feb 25 00:00:35 2013
@@ -226,8 +226,8 @@ svn_client_upgrade(const char *path,
* already been upgraded) and no error is returned. If it doesn't
* exist (external that isn't checked out yet), we'll just get
* svn_node_none. */
- err = svn_wc_read_kind(&external_kind, ctx->wc_ctx,
- external_abspath, FALSE, iterpool2);
+ err = svn_wc_read_kind2(&external_kind, ctx->wc_ctx,
+ external_abspath, TRUE, FALSE, iterpool2);
if (err && err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
{
svn_error_clear(err);
@@ -241,8 +241,8 @@ svn_client_upgrade(const char *path,
/* The upgrade of any dir should be done now, get the now reliable
* kind. */
- err = svn_wc_read_kind(&external_kind, ctx->wc_ctx, external_abspath,
- FALSE, iterpool2);
+ err = svn_wc_read_kind2(&external_kind, ctx->wc_ctx, external_abspath,
+ TRUE, FALSE, iterpool2);
if (err)
goto handle_error;