Author: kotkov
Date: Mon Nov 28 11:59:27 2022
New Revision: 1905567
URL: http://svn.apache.org/viewvc?rev=1905567&view=rev
Log:
On the 'pristines-on-demand-on-mwf' branch: Reuse an RA session when fetching
the text-base contents.
More specifically, we teach svn_client__textbase_sync() to use the passed-in
RA session when available. If there is no such session, this function will
open one internally, optionally returning it to the caller so that it could
be reused further on.
* subversion/libsvn_client/client.h
(svn_client__textbase_sync): Add `ra_session_p`, `ra_session` and the
`result_pool` parameters.
* subversion/libsvn_client/textbase.c
(textbase_hydrate_baton_t): Rename `pool` to `result_pool`. Store the
new `base_abspath` field.
(textbase_hydrate_cb): Open the RA session with standard settings, so
that it could be reused further on if necessary. Starting from r1905528,
there is no performance loss from using an RA session that corresponds to
a working copy. Remove the TODO comment.
(svn_client__textbase_sync): Handle the new input and output RA session
parameters. If the session has been provided by the caller, reparent it
back to the original URL after sync.
* subversion/libsvn_client/cat.c
(svn_client_cat3): Adjust calls to svn_client__textbase_sync().
* subversion/libsvn_client/commit.c
(svn_client_commit6): Adjust calls to svn_client__textbase_sync().
* subversion/libsvn_client/conflicts.c
(begin_resolve, finish_resolve): Adjust calls to svn_client__textbase_sync().
* subversion/libsvn_client/diff.c
(diff_wc_wc): Adjust calls to svn_client__textbase_sync().
(diff_repos_wc): Reuse the available RA session.
* subversion/libsvn_client/resolved.c
(resolve_locked): Adjust calls to svn_client__textbase_sync().
(svn_client__resolve_conflicts): Reuse one RA session across multiple calls
to svn_client__textbase_sync().
* subversion/libsvn_client/revert.c
(revert_with_write_lock_baton): Add `ra_session_p` field.
(revert, svn_client_revert4): Reuse one RA session across multiple calls
to svn_client__textbase_sync().
* subversion/libsvn_client/switch.c
(switch_internal): Reuse the available RA session.
* subversion/libsvn_client/update.c
(update_internal): Reuse the available RA session.
* subversion/libsvn_client/upgrade.c
(upgrade_internal): Adjust a call to svn_client__textbase_sync().
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/cat.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/commit.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/conflicts.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/diff.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/resolved.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/revert.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/switch.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/update.c
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/cat.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/cat.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/cat.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/cat.c
Mon Nov 28 11:59:27 2022
@@ -217,8 +217,9 @@ svn_client_cat3(apr_hash_t **returned_pr
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url,
scratch_pool));
- SVN_ERR(svn_client__textbase_sync(local_abspath, TRUE, TRUE,
- ctx, scratch_pool));
+ /* This will open the RA session internally if needed. */
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, TRUE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
SVN_ERR(svn_client__get_normalized_stream(&normal_stream, ctx->wc_ctx,
local_abspath, revision,
@@ -237,8 +238,8 @@ svn_client_cat3(apr_hash_t **returned_pr
ctx->cancel_func,
ctx->cancel_baton, scratch_pool));
- SVN_ERR(svn_client__textbase_sync(local_abspath, FALSE, TRUE,
- ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/client.h
Mon Nov 28 11:59:27 2022
@@ -1252,12 +1252,27 @@ svn_client__merge_locked(svn_client__con
apr_pool_t *scratch_pool);
/* Synchronize the state of the text-base contents for the LOCAL_ABSPATH tree.
- * Internally this calls svn_wc__textbase_sync(), which see for details. */
+ *
+ * If ALLOW_HYDRATE is true, fetch the required but missing text-base contents
+ * using the provided HYDRATE_CALLBACK and HYDRATE_BATON. If ALLOW_DEHYDRATE
+ * is true, remove the on disk text-base contents that are not required.
+ *
+ * The missing contents will be fetched using the provided RA_SESSION if it
+ * is not NULL. If RA_SESSION is NULL and some of the text-bases have to be
+ * fetched, a new RA session will be opened internally. If RA_SESSION_P is
+ * not NULL, the session used during fetch will be returned in *RA_SESSION_P.
+ * If this is the session that was opened internally, it will be allocated in
+ * RESULT_POOL. Note that *RA_SESSION_P may be set to NULL if no fetching
+ * took place.
+ */
svn_error_t *
-svn_client__textbase_sync(const char *local_abspath,
+svn_client__textbase_sync(svn_ra_session_t **ra_session_p,
+ const char *local_abspath,
svn_boolean_t allow_hydrate,
svn_boolean_t allow_dehydrate,
svn_client_ctx_t *ctx,
+ svn_ra_session_t *ra_session,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Returns the first version that supported the working copy metadata format
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/commit.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/commit.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/commit.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/commit.c
Mon Nov 28 11:59:27 2022
@@ -729,8 +729,9 @@ svn_client_commit6(const apr_array_heade
goto cleanup;
cmt_err = svn_error_trace(
- svn_client__textbase_sync(lock_root, FALSE, TRUE,
- ctx, iterpool));
+ svn_client__textbase_sync(NULL, lock_root,
+ FALSE, TRUE, ctx,
+ NULL, iterpool, iterpool));
if (cmt_err)
goto cleanup;
@@ -1081,8 +1082,9 @@ svn_client_commit6(const apr_array_heade
svn_pool_clear(iterpool);
unlock_err = svn_error_compose_create(
- svn_client__textbase_sync(lock_root, FALSE, TRUE,
- ctx, iterpool),
+ svn_client__textbase_sync(NULL, lock_root,
+ FALSE, TRUE, ctx,
+ NULL, iterpool, iterpool),
unlock_err);
unlock_err = svn_error_compose_create(
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/conflicts.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/conflicts.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/conflicts.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/conflicts.c
Mon Nov 28 11:59:27 2022
@@ -6425,7 +6425,9 @@ begin_resolve(const char **root_abspath_
local_abspath,
result_pool, scratch_pool));
- err = svn_client__textbase_sync(lock_abspath, TRUE, TRUE, ctx, scratch_pool);
+ /* This will open the RA session internally if needed. */
+ err = svn_client__textbase_sync(NULL, lock_abspath, TRUE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool);
if (err)
{
return svn_error_compose_create(
@@ -6448,7 +6450,8 @@ finish_resolve(const char *root_abspath,
err = svn_error_compose_create(
err,
- svn_client__textbase_sync(root_abspath, FALSE, TRUE, ctx,
scratch_pool));
+ svn_client__textbase_sync(NULL, root_abspath, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
err = svn_error_compose_create(
err,
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/diff.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/diff.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/diff.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/diff.c
Mon Nov 28 11:59:27 2022
@@ -1866,7 +1866,9 @@ diff_wc_wc(const char *path1,
"or between the working versions of two paths"
)));
- SVN_ERR(svn_client__textbase_sync(abspath1, TRUE, TRUE, ctx, scratch_pool));
+ /* This will open the RA session internally if needed. */
+ SVN_ERR(svn_client__textbase_sync(NULL, abspath1, TRUE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
SVN_ERR(svn_wc__diff7(TRUE,
ctx->wc_ctx, abspath1, depth,
@@ -1875,7 +1877,8 @@ diff_wc_wc(const char *path1,
ctx->cancel_func, ctx->cancel_baton,
result_pool, scratch_pool));
- SVN_ERR(svn_client__textbase_sync(abspath1, FALSE, TRUE, ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, abspath1, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}
@@ -2140,8 +2143,6 @@ diff_repos_wc(struct diff_driver_info_t
SVN_ERR(svn_dirent_get_absolute(&abspath2, path2, scratch_pool));
- SVN_ERR(svn_client__textbase_sync(abspath2, TRUE, TRUE, ctx, scratch_pool));
-
/* Check if our diff target is a copied node. */
SVN_ERR(svn_wc__node_get_origin(&is_copy,
&cf_revision,
@@ -2276,6 +2277,9 @@ diff_repos_wc(struct diff_driver_info_t
if (reverse)
diff_processor = svn_diff__tree_processor_reverse_create(diff_processor,
scratch_pool);
+ SVN_ERR(svn_client__textbase_sync(NULL, abspath2, TRUE, TRUE, ctx,
+ ra_session, scratch_pool, scratch_pool));
+
/* Use the diff editor to generate the diff. */
SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
SVN_RA_CAPABILITY_DEPTH, scratch_pool));
@@ -2347,7 +2351,8 @@ diff_repos_wc(struct diff_driver_info_t
scratch_pool));
}
- SVN_ERR(svn_client__textbase_sync(abspath2, FALSE, TRUE, ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, abspath2, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/resolved.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/resolved.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/resolved.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/resolved.c
Mon Nov 28 11:59:27 2022
@@ -53,6 +53,7 @@ svn_client__resolve_conflicts(svn_boolea
{
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
apr_array_header_t *array;
+ svn_ra_session_t *ra_session;
int i;
if (conflicts_remain)
@@ -61,14 +62,16 @@ svn_client__resolve_conflicts(svn_boolea
SVN_ERR(svn_hash_keys(&array, conflicted_paths, scratch_pool));
svn_sort__array(array, svn_sort_compare_paths);
+ ra_session = NULL;
for (i = 0; i < array->nelts; i++)
{
const char *local_abspath = APR_ARRAY_IDX(array, i, const char *);
svn_pool_clear(iterpool);
- SVN_ERR(svn_client__textbase_sync(local_abspath, TRUE, TRUE, ctx,
- iterpool));
+ SVN_ERR(svn_client__textbase_sync(&ra_session, local_abspath,
+ TRUE, TRUE, ctx, ra_session,
+ scratch_pool, iterpool));
SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
svn_depth_empty,
@@ -103,8 +106,8 @@ svn_client__resolve_conflicts(svn_boolea
*conflicts_remain = TRUE;
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, FALSE, TRUE, ctx,
- iterpool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, FALSE, TRUE, ctx,
+ NULL, iterpool, iterpool));
}
svn_pool_destroy(iterpool);
@@ -119,8 +122,9 @@ resolve_locked(const char *local_abspath
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
- SVN_ERR(svn_client__textbase_sync(root_abspath, TRUE, TRUE, ctx,
- scratch_pool));
+ /* This will open the RA session internally if needed. */
+ SVN_ERR(svn_client__textbase_sync(NULL, root_abspath, TRUE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
depth,
@@ -134,8 +138,8 @@ resolve_locked(const char *local_abspath
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
- SVN_ERR(svn_client__textbase_sync(root_abspath, FALSE, TRUE, ctx,
- scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, root_abspath, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/revert.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/revert.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/revert.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/revert.c
Mon Nov 28 11:59:27 2022
@@ -53,6 +53,7 @@ struct revert_with_write_lock_baton {
svn_boolean_t metadata_only;
svn_boolean_t added_keep_local;
svn_client_ctx_t *ctx;
+ svn_ra_session_t **ra_session_p;
};
/* (Note: All arguments are in the baton above.)
@@ -69,8 +70,9 @@ revert(void *baton, apr_pool_t *result_p
struct revert_with_write_lock_baton *b = baton;
svn_error_t *err;
- SVN_ERR(svn_client__textbase_sync(b->local_abspath, TRUE, TRUE,
- b->ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(b->ra_session_p, b->local_abspath,
+ TRUE, TRUE, b->ctx, *b->ra_session_p,
+ result_pool, scratch_pool));
err = svn_wc_revert6(b->ctx->wc_ctx,
b->local_abspath,
@@ -111,8 +113,8 @@ revert(void *baton, apr_pool_t *result_p
return svn_error_trace(err);
}
- SVN_ERR(svn_client__textbase_sync(b->local_abspath, FALSE, TRUE,
- b->ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, b->local_abspath, FALSE, TRUE,
b->ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}
@@ -134,6 +136,7 @@ svn_client_revert4(const apr_array_heade
svn_config_t *cfg;
svn_boolean_t use_commit_times;
struct revert_with_write_lock_baton baton;
+ svn_ra_session_t *ra_session;
/* Don't even attempt to modify the working copy if any of the
* targets look like URLs. URLs are invalid input. */
@@ -156,7 +159,7 @@ svn_client_revert4(const apr_array_heade
FALSE));
iterpool = svn_pool_create(pool);
-
+ ra_session = NULL;
for (i = 0; i < paths->nelts; i++)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
@@ -182,6 +185,7 @@ svn_client_revert4(const apr_array_heade
baton.metadata_only = metadata_only;
baton.added_keep_local = added_keep_local;
baton.ctx = ctx;
+ baton.ra_session_p = &ra_session;
err = svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath, iterpool);
if (err)
@@ -190,7 +194,7 @@ svn_client_revert4(const apr_array_heade
: svn_dirent_dirname(local_abspath, pool);
err = svn_wc__call_with_write_lock(revert, &baton, ctx->wc_ctx,
lock_target, FALSE,
- iterpool, iterpool);
+ pool, iterpool);
if (err)
goto errorful;
}
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/switch.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/switch.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/switch.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/switch.c
Mon Nov 28 11:59:27 2022
@@ -202,8 +202,6 @@ switch_internal(svn_revnum_t *result_rev
pool));
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, TRUE, TRUE, ctx, pool));
-
/* Open an RA session to 'source' URL */
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &switch_loc,
switch_url, anchor_abspath,
@@ -299,6 +297,9 @@ switch_internal(svn_revnum_t *result_rev
SVN_ERR(svn_ra_reparent(ra_session, anchor_url, pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, TRUE, TRUE, ctx,
+ ra_session, pool, pool));
+
/* Fetch the switch (update) editor. If REVISION is invalid, that's
okay; the RA driver will call editor->set_target_revision() later on. */
SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
@@ -371,7 +372,8 @@ switch_internal(svn_revnum_t *result_rev
ctx, pool));
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, FALSE, TRUE, ctx, pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, FALSE, TRUE, ctx,
+ NULL, pool, pool));
/* Let everyone know we're finished here. */
if (ctx->notify_func2)
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c
Mon Nov 28 11:59:27 2022
@@ -30,7 +30,8 @@
/* A baton for use with textbase_hydrate_cb(). */
typedef struct textbase_hydrate_baton_t
{
- apr_pool_t *pool;
+ apr_pool_t *result_pool;
+ const char *base_abspath;
svn_client_ctx_t *ctx;
svn_ra_session_t *ra_session;
} textbase_hydrate_baton_t;
@@ -57,20 +58,10 @@ textbase_hydrate_cb(void *baton,
{
svn_ra_session_t *session;
- /* ### Transitional: open a *new* RA session for every call to
- svn_client__textbase_sync().
-
- What we could do here: make a sync context that accepts an optional
- RA session. If it's passed-in, use that session. Else, open a new
- session, but pass it on to the caller so that it could be reused
- further on. */
-
- /* Open the RA session that does not correspond to a working copy.
- At this point we know that we don't have a local copy of the contents,
- so rechecking that in get_wc_contents() is just a waste of time. */
- SVN_ERR(svn_client__open_ra_session_internal(&session, NULL, url, NULL,
- NULL, FALSE, FALSE, b->ctx,
- b->pool, scratch_pool));
+ SVN_ERR(svn_client__open_ra_session_internal(&session, NULL,
+ url, b->base_abspath,
+ NULL, TRUE, TRUE, b->ctx,
+ b->result_pool,
scratch_pool));
b->ra_session = session;
}
@@ -93,19 +84,31 @@ textbase_hydrate_cb(void *baton,
}
svn_error_t *
-svn_client__textbase_sync(const char *local_abspath,
+svn_client__textbase_sync(svn_ra_session_t **ra_session_p,
+ const char *local_abspath,
svn_boolean_t allow_hydrate,
svn_boolean_t allow_dehydrate,
svn_client_ctx_t *ctx,
+ svn_ra_session_t *ra_session,
+ apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
textbase_hydrate_baton_t baton = {0};
+ const char *old_session_url = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- baton.pool = scratch_pool;
+ /* A caller may want to reuse the RA session that we open internally.
+ If that's the case, use the result pool. Otherwise, the session
+ is temporary, so use the scratch pool. */
+ if (ra_session_p)
+ baton.result_pool = result_pool;
+ else
+ baton.result_pool = scratch_pool;
+
+ baton.base_abspath = local_abspath;
baton.ctx = ctx;
- baton.ra_session = NULL;
+ baton.ra_session = ra_session;
if (ctx->notify_func2 && allow_hydrate)
{
@@ -115,12 +118,18 @@ svn_client__textbase_sync(const char *lo
ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
}
+ if (ra_session)
+ SVN_ERR(svn_ra_get_session_url(ra_session, &old_session_url,
scratch_pool));
+
SVN_ERR(svn_wc__textbase_sync(ctx->wc_ctx, local_abspath,
allow_hydrate, allow_dehydrate,
textbase_hydrate_cb, &baton,
ctx->cancel_func, ctx->cancel_baton,
scratch_pool));
+ if (ra_session)
+ SVN_ERR(svn_ra_reparent(ra_session, old_session_url, scratch_pool));
+
if (ctx->notify_func2 && allow_hydrate)
{
svn_wc_notify_t *notify
@@ -129,5 +138,8 @@ svn_client__textbase_sync(const char *lo
ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
}
+ if (ra_session_p)
+ *ra_session_p = baton.ra_session;
+
return SVN_NO_ERROR;
}
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/update.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/update.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/update.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/update.c
Mon Nov 28 11:59:27 2022
@@ -467,13 +467,13 @@ update_internal(svn_revnum_t *result_rev
ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, TRUE, TRUE,
- ctx, scratch_pool));
-
SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, anchor_url,
anchor_abspath, ctx, result_pool, scratch_pool));
ra_session = *ra_session_p;
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, TRUE, TRUE, ctx,
+ ra_session, scratch_pool, scratch_pool));
+
/* If we got a corrected URL from the RA subsystem, we'll need to
relocate our working copy first. */
if (corrected_url)
@@ -579,8 +579,8 @@ update_internal(svn_revnum_t *result_rev
repos_root_url, ra_session, ctx, scratch_pool));
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, FALSE, TRUE,
- ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
/* Let everyone know we're finished here (unless we're asked not to). */
if (ctx->notify_func2 && notify_summary)
Modified:
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c?rev=1905567&r1=1905566&r2=1905567&view=diff
==============================================================================
---
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
(original)
+++
subversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/upgrade.c
Mon Nov 28 11:59:27 2022
@@ -188,8 +188,8 @@ upgrade_internal(const char *path,
&info_baton, scratch_pool));
}
- SVN_ERR(svn_client__textbase_sync(local_abspath, FALSE, TRUE,
- ctx, scratch_pool));
+ SVN_ERR(svn_client__textbase_sync(NULL, local_abspath, FALSE, TRUE, ctx,
+ NULL, scratch_pool, scratch_pool));
return SVN_NO_ERROR;
}