Hi!
NOTE: This patch depends on my patch for #3390 that has not been
commited yet [1]. The external_func uses abspaths and that is fixed in
the referred patch. I have two more patches that depend on [1].
make check passes with [1] applied.
[[[
Replace deprecated svn_wc_{crawl_revisions4(),get_update_editor3()}.
Remove svn_wc_edited_externals().
* subversion/libsvn_client/update.c
(svn_client__update_internal): Use the new get_update_editor4() with
wc_ctx and external_func. Use the new crawl_revisions5() with
wc_ctx and external_func. Remove svn_wc_edited_externals() since we
already have the hashtables from our external_func.
Patch by: <daniel{_AT_}longitudo.com>
]]]
[1] http://svn.haxx.se/dev/archive-2009-12/0286.shtml
Index: subversion/libsvn_client/update.c
===================================================================
--- subversion/libsvn_client/update.c (revision 891793)
+++ subversion/libsvn_client/update.c (arbetskopia)
@@ -115,6 +115,7 @@
struct ff_baton *ffb;
const char *local_abspath;
const char *anchor_abspath;
+ svn_client__external_func_baton_t efb;
svn_boolean_t server_supports_depth;
svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
SVN_CONFIG_CATEGORY_CONFIG,
@@ -239,19 +240,25 @@
ffb->repos_root = repos_root;
ffb->pool = pool;
+ /* Build a boton for the externals-info-gatherer callback. */
+ efb.externals_new = apr_hash_make(pool);
+ efb.externals_old = apr_hash_make(pool);
+ efb.ambient_depths = apr_hash_make(pool);
+ efb.result_pool = pool;
+
/* Fetch the update editor. If REVISION is invalid, that's okay;
the RA driver will call editor->set_target_revision later on. */
- SVN_ERR(svn_wc_get_update_editor3(&revnum, adm_access, target,
- use_commit_times, depth, depth_is_sticky,
- allow_unver_obstructions,
+ SVN_ERR(svn_wc_get_update_editor4(&update_editor, &update_edit_baton,
+ &revnum, ctx->wc_ctx, anchor_abspath,
+ target, use_commit_times, depth,
+ depth_is_sticky, allow_unver_obstructions,
+ diff3_cmd, preserved_exts,
+ file_fetcher, ffb,
+ ctx->conflict_func, ctx->conflict_baton,
+ svn_client__external_info_gatherer, &efb,
+ ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
- ctx->cancel_func, ctx->cancel_baton,
- ctx->conflict_func, ctx->conflict_baton,
- file_fetcher, ffb,
- diff3_cmd, preserved_exts,
- &update_editor, &update_edit_baton,
- traversal_info,
- pool));
+ pool, pool));
/* 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. */
@@ -269,12 +276,13 @@
/* Drive the reporter structure, describing the revisions within
PATH. When we call reporter->finish_report, the
update_editor will be driven by svn_repos_dir_delta2. */
- err = svn_wc_crawl_revisions4(path, dir_access, reporter, report_baton,
- TRUE, depth, (! depth_is_sticky),
+ err = svn_wc_crawl_revisions5(ctx->wc_ctx, local_abspath, reporter,
+ report_baton, TRUE, depth, (! depth_is_sticky),
(! server_supports_depth),
use_commit_times,
- ctx->notify_func2, ctx->notify_baton2,
- traversal_info, pool);
+ svn_client__external_info_gatherer,
+ &efb, ctx->notify_func2, ctx->notify_baton2,
+ pool);
if (err)
{
@@ -290,13 +298,9 @@
the primary operation. */
if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
{
- apr_hash_t *externals_old, *externals_new, *ambient_depths;
-
- svn_wc_edited_externals(&externals_old, &externals_new, traversal_info);
- svn_wc_traversed_depths(&ambient_depths, traversal_info);
-
- SVN_ERR(svn_client__handle_externals(adm_access, externals_old,
- externals_new, ambient_depths,
+ SVN_ERR(svn_client__handle_externals(adm_access, efb.externals_old,
+ efb.externals_new,
+ efb.ambient_depths,
anchor_url, anchor, repos_root,
depth, use_sleep, ctx, pool));
}