Author: philip
Date: Tue Nov 25 10:33:16 2014
New Revision: 1641564
URL: http://svn.apache.org/r1641564
Log:
Fix issue #4185: SVN client silently fails to import an ancestor of
external file specified viasvn:externals rule with operative revision.
* subversion/libsvn_client/externals.c
(switch_file_external): replace 'url' parameter mistakenly
passed to svn_ra_do_switch3() by 'switch_loc->url'.
* subversion/tests/cmdline/externals_tests.py
(pinned_externals): Tweak expectations.
Patch by: Alex Siyanko <asiyanko{_AT_}xdyne.com>
me
Modified:
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/tests/cmdline/externals_tests.py
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1641564&r1=1641563&r2=1641564&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Tue Nov 25 10:33:16
2014
@@ -493,7 +493,10 @@ switch_file_external(const char *local_a
svn_dirent_split(&dir_abspath, &target, local_abspath, scratch_pool);
- /* Open an RA session to 'source' URL */
+ /* ### Why do we open a new session? RA_SESSION is a valid
+ ### session -- the caller used it to call svn_ra_check_path on
+ ### this very URL, the caller also did the resolving and
+ ### reparenting that is repeated here. */
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &switch_loc,
url, dir_abspath,
peg_revision, revision,
@@ -528,7 +531,7 @@ switch_file_external(const char *local_a
invalid revnum, that means RA will use the latest revision. */
SVN_ERR(svn_ra_do_switch3(ra_session, &reporter, &report_baton,
switch_loc->rev,
- target, svn_depth_unknown, url,
+ target, svn_depth_unknown, switch_loc->url,
FALSE /* send_copyfrom */,
TRUE /* ignore_ancestry */,
switch_editor, switch_baton,
Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1641564&r1=1641563&r2=1641564&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Tue Nov 25
10:33:16 2014
@@ -3164,6 +3164,7 @@ def pinned_externals(sbox):
# The interesting values
'Z/old-plain' : Item(contents="This is the file 'mu'.\n"),
'Z/new-plain' : Item(contents="This is the file 'mu'.\n"),
+ 'Z/new-rev' : Item(contents="This is the file 'mu'.\n"),
'Z/new-dir-rev' : Item(),
# And verifying X