You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/02/05 19:41:48 UTC
svn commit: r907043 - in /subversion/branches/1.6.x-issue3390: ./
subversion/libsvn_client/switch.c subversion/tests/cmdline/externals_tests.py
Author: cmpilato
Date: Fri Feb 5 18:41:47 2010
New Revision: 907043
URL: http://svn.apache.org/viewvc?rev=907043&view=rev
Log:
On the '1.6.x-issue3390' branch, feign a backport of the issue 3390
fix by applying Daniel Naeslund's backport patch, and then using 'svn
merge --record-only' to claim that this was a merge of r877016 and
r902093 from trunk.
Modified:
subversion/branches/1.6.x-issue3390/ (props changed)
subversion/branches/1.6.x-issue3390/subversion/libsvn_client/switch.c
subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py
Propchange: subversion/branches/1.6.x-issue3390/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 5 18:41:47 2010
@@ -54,4 +54,4 @@
/subversion/branches/tc_url_rev:870696-870828
/subversion/branches/tree-conflicts:864636-869499
/subversion/branches/tree-conflicts-notify:870271-870353
-/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880450,880474,880525-880526,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,900797
+/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,877016,879093,879688,880274-880275,880370,880450,880474,880525-880526,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,900797,902093
Modified: subversion/branches/1.6.x-issue3390/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/libsvn_client/switch.c?rev=907043&r1=907042&r2=907043&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/1.6.x-issue3390/subversion/libsvn_client/switch.c Fri Feb 5 18:41:47 2010
@@ -218,15 +218,16 @@
PATH. When we call reporter->finish_report, the update_editor
will be driven by svn_repos_dir_delta2.
- We pass NULL for traversal_info because this is a switch, not an
- update, and therefore we don't want to handle any externals
- except the ones directly affected by the switch. */
+ We pass in a traversal_info for recording all externals. It
+ shouldn't be needed for a switch if it wasn't for the relative
+ externals of type '../path'. All of those must be resolved to
+ the new location. */
err = svn_wc_crawl_revisions4(path, dir_access, reporter, report_baton,
TRUE, depth, (! depth_is_sticky),
(! server_supports_depth),
use_commit_times,
ctx->notify_func2, ctx->notify_baton2,
- NULL, /* no traversal info */
+ traversal_info,
pool);
if (err)
Modified: subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py?rev=907043&r1=907042&r2=907043&view=diff
==============================================================================
--- subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/1.6.x-issue3390/subversion/tests/cmdline/externals_tests.py Fri Feb 5 18:41:47 2010
@@ -18,6 +18,7 @@
# General modules
import sys
+import re
import os
import warnings
@@ -1198,6 +1199,51 @@
None, None, None, None, None,
True)
+########################################################################
+
+# Issue #3351.
+def switch_relative_external(sbox):
+ "switch a relative external"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ # Create a relative external in A/D on ../B
+ A_path = os.path.join(wc_dir, 'A')
+ A_copy_path = os.path.join(wc_dir, 'A_copy')
+ A_copy_url = repo_url + '/A_copy'
+ D_path = os.path.join(A_path, 'D')
+ ext_path = os.path.join(D_path, 'ext')
+ externals_prop = "../B ext\n"
+ change_external(D_path, externals_prop)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'log msg',
+ '--quiet', wc_dir)
+
+ # Update our working copy, and create a "branch" (A => A_copy)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up',
+ '--quiet', wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [], 'cp',
+ '--quiet', A_path, A_copy_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ci', '-m', 'log msg',
+ '--quiet', wc_dir)
+
+ # Okay. We now want to switch A to A_copy, which *should* cause
+ # A/D/ext to point to the URL for A_copy/D/ext.
+ svntest.actions.run_and_verify_svn(None, None, [], 'sw',
+ '--quiet', A_copy_url, A_path)
+
+ expected_infos = [
+ { 'Path' : re.escape(D_path),
+ 'URL' : sbox.repo_url + '/A_copy/D',
+ },
+ { 'Path' : re.escape(ext_path),
+ 'URL' : sbox.repo_url + '/A_copy/B',
+ },
+ ]
+ svntest.actions.run_and_verify_info(expected_infos, D_path, ext_path)
########################################################################
# Run the tests
@@ -1223,6 +1269,7 @@
can_place_file_external_into_dir_external,
external_into_path_with_spaces,
binary_file_externals,
+ switch_relative_external,
]
if __name__ == '__main__':