subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1563372 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_client/update.c subversion/tests/cmdline/redirect_tests.py
Date Sat, 01 Feb 2014 04:04:38 GMT
Author: svn-role
Date: Sat Feb  1 04:04:38 2014
New Revision: 1563372

URL: http://svn.apache.org/r1563372
Log:
Merge the r1541638 group from trunk:

 * r1541638, r1545302
   Fix automatic relocate during update for working copies that are
   not at repository root.
   Justification:
     Makes it much easier on users when their hoster migrates from http
     to https. (Too bad that there is no way to safely transfer credentials..)
   Votes:
     +1: rhuijben, philip, ivan

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_client/update.c
    subversion/branches/1.8.x/subversion/tests/cmdline/redirect_tests.py

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1541638,1545302

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1563372&r1=1563371&r2=1563372&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Sat Feb  1 04:04:38 2014
@@ -256,12 +256,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1541638, r1545302
-   Fix automatic relocate during update for working copies that are
-   not at repository root.
-   Justification:
-     Makes it much easier on users when their hoster migrates from http
-     to https. (Too bad that there is no way to safely transfer credentials..)
-   Votes:
-     +1: rhuijben, philip, ivan

Modified: subversion/branches/1.8.x/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/update.c?rev=1563372&r1=1563371&r2=1563372&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/update.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/update.c Sat Feb  1 04:04:38 2014
@@ -383,7 +383,7 @@ update_internal(svn_revnum_t *result_rev
       SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url, pool));
 
       /* svn_client_relocate2() will check the uuid */
-      SVN_ERR(svn_client_relocate2(anchor_abspath, anchor_url,
+      SVN_ERR(svn_client_relocate2(anchor_abspath, repos_root_url,
                                    new_repos_root_url, ignore_externals,
                                    ctx, pool));
 

Modified: subversion/branches/1.8.x/subversion/tests/cmdline/redirect_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/redirect_tests.py?rev=1563372&r1=1563371&r2=1563372&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/redirect_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/redirect_tests.py Sat Feb  1 04:04:38
2014
@@ -140,6 +140,44 @@ def redirected_update(sbox):
   verify_url(wc_dir, sbox.repo_url)
 
 #----------------------------------------------------------------------
+@SkipUnless(svntest.main.is_ra_type_dav)
+def redirected_nonroot_update(sbox):
+  "redirected update of non-repos-root wc"
+
+  sbox.build(create_wc=False)
+  wc_dir = sbox.wc_dir
+  checkout_url = sbox.repo_url + '/A'
+  relocate_url = sbox.redirected_root_url() + '/A'
+
+  # Checkout a subdir of the repository root.
+  exit_code, out, err = svntest.main.run_svn(None, 'co',
+                                             checkout_url, wc_dir)
+  if err:
+    raise svntest.Failure
+  
+  # Relocate (by cheating) the working copy to the redirect URL.  When
+  # we then update, we'll expect to find ourselves automagically back
+  # to the original URL.  (This is because we can't easily introduce a
+  # redirect to the Apache configuration from the test suite here.)
+  svntest.actions.no_relocate_validation()
+  exit_code, out, err = svntest.main.run_svn(None, 'sw', '--relocate',
+                                             checkout_url, relocate_url,
+                                             wc_dir)
+  svntest.actions.do_relocate_validation()
+
+  # Now update the working copy.
+  exit_code, out, err = svntest.main.run_svn(None, 'up', wc_dir)
+  if err:
+    raise svntest.Failure
+  if not re.match("^Updating '.*':", out[0]):
+    raise svntest.Failure
+  if not redirect_regex.match(out[1]):
+    raise svntest.Failure
+
+  # Verify that we have the expected URL.
+  verify_url(wc_dir, checkout_url)
+
+#----------------------------------------------------------------------
 
 ########################################################################
 # Run the tests
@@ -149,6 +187,7 @@ test_list = [ None,
               temporary_redirect,
               redirected_checkout,
               redirected_update,
+              redirected_nonroot_update,
              ]
 
 if __name__ == '__main__':



Mime
View raw message