You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2019/01/08 11:10:58 UTC
svn commit: r1850730 - in /subversion/trunk/subversion:
include/private/svn_client_private.h libsvn_client/copy.c
Author: julianfoad
Date: Tue Jan 8 11:10:58 2019
New Revision: 1850730
URL: http://svn.apache.org/viewvc?rev=1850730&view=rev
Log:
Fix some RA session breakage in the WC editor (issue #4786).
* subversion/include/private/svn_client_private.h
subversion/libsvn_client/copy.c
(svn_client__repos_to_wc_copy_dir): Note broken foreign-repo copy.
(svn_client__repos_to_wc_copy_internal): Save and restore the session URL.
Modified:
subversion/trunk/subversion/include/private/svn_client_private.h
subversion/trunk/subversion/libsvn_client/copy.c
Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1850730&r1=1850729&r2=1850730&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Tue Jan 8 11:10:58 2019
@@ -400,8 +400,8 @@ svn_client__get_diff_summarize_callbacks
*
* If not same repositories, then remove any svn:mergeinfo property.
*
- * Use RA_SESSION to fetch the data. The session may point to a different
- * URL after returning.
+ * Use RA_SESSION to fetch the data. The session may point to any URL
+ * within the source repository.
*
* This API does not process any externals definitions that may be present
* on copied directories.
Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1850730&r1=1850729&r2=1850730&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Tue Jan 8 11:10:58 2019
@@ -2434,6 +2434,8 @@ svn_client__repos_to_wc_copy_dir(svn_boo
*timestamp_sleep = TRUE;
+ /* ### Reparenting "ra_session" can't be right, can it? As this is
+ a foreign repo, surely we need a new RA session? */
SVN_ERR(svn_client__pathrev_create_with_session(&location, ra_session,
src_revnum, src_url,
scratch_pool));
@@ -2599,9 +2601,13 @@ svn_client__repos_to_wc_copy_internal(sv
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
+ const char *old_session_url;
svn_boolean_t timestamp_sleep_ignored;
svn_boolean_t same_repositories;
+ SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session,
+ src_url, scratch_pool));
+
SVN_ERR(is_same_repository(&same_repositories,
ra_session, dst_abspath, ctx, scratch_pool));
@@ -2626,6 +2632,9 @@ svn_client__repos_to_wc_copy_internal(sv
ra_session,
ctx, scratch_pool));
}
+
+ /* Reparent the session back to the original URL. */
+ SVN_ERR(svn_ra_reparent(ra_session, old_session_url, scratch_pool));
return SVN_NO_ERROR;
}