You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/04/26 03:20:58 UTC
svn commit: r1590208 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_wc/wc_db.c
Author: breser
Date: Sat Apr 26 01:20:58 2014
New Revision: 1590208
URL: http://svn.apache.org/r1590208
Log:
Merge the 1.7.x-r1580626 branch:
* r1580626, r1580650
Fix 'svn copy URL WC' after the working copy is relocated
Justification:
Without this patch (which is a followup of 1560690 backported in 1.7.16),
descendants of copies in a relocated working copy are marked as incomplete
(and these nodes are all created at their own op-depth)
Branch:
^/subversion/branches/1.7.x-r1580626
Votes:
+1: rhuijben, philip, breser
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-r1580626:r1580636-1590207
Merged /subversion/trunk:r1580626,1580650
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1590208&r1=1590207&r2=1590208&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Apr 26 01:20:58 2014
@@ -118,13 +118,3 @@ Veto-blocked changes:
Approved changes:
=================
- * r1580626, r1580650
- Fix 'svn copy URL WC' after the working copy is relocated
- Justification:
- Without this patch (which is a followup of 1560690 backported in 1.7.16),
- descendants of copies in a relocated working copy are marked as incomplete
- (and these nodes are all created at their own op-depth)
- Branch:
- ^/subversion/branches/1.7.x-r1580626
- Votes:
- +1: rhuijben, philip, breser
Modified: subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c?rev=1590208&r1=1590207&r2=1590208&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c Sat Apr 26 01:20:58 2014
@@ -3308,8 +3308,9 @@ get_info_for_copy(apr_int64_t *copyfrom_
svn_wc__db_kind_t *kind,
svn_boolean_t *op_root,
svn_boolean_t *have_work,
- svn_wc__db_wcroot_t *wcroot,
+ svn_wc__db_wcroot_t *src_wcroot,
const char *local_relpath,
+ svn_wc__db_wcroot_t *dst_wcroot,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -3322,7 +3323,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
NULL /* have_base */,
NULL /* have_more_work */,
have_work,
- wcroot, local_relpath, result_pool, scratch_pool));
+ src_wcroot, local_relpath, result_pool, scratch_pool));
if (*status == svn_wc__db_status_excluded)
{
@@ -3339,7 +3340,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
&parent_status,
&parent_kind,
NULL, &parent_have_work,
- wcroot, parent_relpath,
+ src_wcroot, parent_relpath, dst_wcroot,
scratch_pool, scratch_pool));
if (*copyfrom_relpath)
*copyfrom_relpath = svn_relpath_join(*copyfrom_relpath, base_name,
@@ -3352,7 +3353,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
SVN_ERR(scan_addition(NULL, &op_root_relpath,
NULL, NULL, /* repos_* */
copyfrom_relpath, copyfrom_id, copyfrom_rev,
- wcroot, local_relpath,
+ src_wcroot, local_relpath,
scratch_pool, scratch_pool));
if (*copyfrom_relpath)
{
@@ -3368,7 +3369,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
const char *base_del_relpath, *work_del_relpath;
SVN_ERR(scan_deletion(&base_del_relpath, NULL, &work_del_relpath,
- wcroot, local_relpath, scratch_pool,
+ src_wcroot, local_relpath, scratch_pool,
scratch_pool));
if (work_del_relpath)
{
@@ -3381,7 +3382,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
SVN_ERR(scan_addition(NULL, &op_root_relpath,
NULL, NULL, /* repos_* */
copyfrom_relpath, copyfrom_id, copyfrom_rev,
- wcroot, parent_del_relpath,
+ src_wcroot, parent_del_relpath,
scratch_pool, scratch_pool));
*copyfrom_relpath
= svn_relpath_join(*copyfrom_relpath,
@@ -3395,7 +3396,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
copyfrom_id,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
- wcroot, local_relpath,
+ src_wcroot, local_relpath,
result_pool, scratch_pool));
}
else
@@ -3407,6 +3408,24 @@ get_info_for_copy(apr_int64_t *copyfrom_
*copyfrom_rev = revision;
}
+ if (src_wcroot != dst_wcroot && *copyfrom_relpath)
+ {
+ const char *repos_root_url;
+ const char *repos_uuid;
+
+ /* Pass the right repos-id for the destination db. We can't just use
+ the id of the source database, as this value can change after
+ relocation (and perhaps also when we start storing multiple
+ working copies in a single db)! */
+
+ SVN_ERR(fetch_repos_info(&repos_root_url, &repos_uuid,
+ src_wcroot->sdb, *copyfrom_id,
+ scratch_pool));
+
+ SVN_ERR(create_repos_id(copyfrom_id, repos_root_url, repos_uuid,
+ dst_wcroot->sdb, scratch_pool));
+ }
+
return SVN_NO_ERROR;
}
@@ -3455,7 +3474,8 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
SVN_ERR(get_info_for_copy(©from_id, ©from_relpath, ©from_rev,
&status, &kind, &op_root, &have_work, src_wcroot,
- src_relpath, scratch_pool, scratch_pool));
+ src_relpath, dst_wcroot,
+ scratch_pool, scratch_pool));
SVN_ERR(op_depth_for_copy(&dst_op_depth, &dst_np_op_depth, copyfrom_id,
copyfrom_relpath, copyfrom_rev,
@@ -3606,21 +3626,6 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
}
else
{
- if (copyfrom_relpath)
- {
- const char *repos_root_url;
- const char *repos_uuid;
-
- /* Pass the right repos-id for the destination db! */
-
- SVN_ERR(fetch_repos_info(&repos_root_url, &repos_uuid,
- src_wcroot->sdb, copyfrom_id,
- scratch_pool));
-
- SVN_ERR(create_repos_id(©from_id, repos_root_url, repos_uuid,
- dst_wcroot->sdb, scratch_pool));
- }
-
SVN_ERR(cross_db_copy(src_wcroot, src_relpath, dst_wcroot,
dst_relpath, dst_presence, dst_op_depth,
dst_np_op_depth, kind,