Author: philip
Date: Thu Jan 29 19:27:19 2015
New Revision: 1655821
URL: http://svn.apache.org/r1655821
Log:
Distingush between permanent and temporary redirections to match the
1.8 behaviour.
* subversion/libsvn_ra_serf/options.c
(svn_ra_serf__exchange_capabilities): Permanent or temporary error.
* subversion/tests/cmdline/redirect_tests.py
(redirected_copy): Extend with temporary redirect.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/options.c
subversion/trunk/subversion/tests/cmdline/redirect_tests.py
Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=1655821&r1=1655820&r2=1655821&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Thu Jan 29 19:27:19
2015
@@ -555,8 +555,9 @@ svn_ra_serf__exchange_capabilities(svn_r
&& opt_ctx->handler->sline.code < 399)
{
return svn_error_createf(SVN_ERR_RA_SESSION_URL_MISMATCH, NULL,
- _("The repository reports that it was moved "
- "to '%s'"),
+ (opt_ctx->handler->sline.code == 301
+ ? _("Repository moved permanently to '%s'")
+ : _("Repository moved temporarily to '%s'")),
opt_ctx->handler->location);
}
Modified: subversion/trunk/subversion/tests/cmdline/redirect_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/redirect_tests.py?rev=1655821&r1=1655820&r2=1655821&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/redirect_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/redirect_tests.py Thu Jan 29
19:27:19 2015
@@ -212,7 +212,7 @@ def redirected_copy(sbox):
sbox.build(create_wc=False)
# E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH
- expected_error = "svn: E170011: The repository.*moved"
+ expected_error = "svn: E170011: Repository moved permanently"
# This tests the actual copy handling
svntest.actions.run_and_verify_svn(None, None, expected_error,
@@ -226,6 +226,20 @@ def redirected_copy(sbox):
sbox.redirected_root_url() + '/A',
'^/copy-of-A')
+ # E170011 = SVN_ERR_RA_SESSION_URL_MISMATCH
+ expected_error = "svn: E170011: Repository moved temporarily"
+
+ # This tests the actual copy handling
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp', '-m', 'failed copy',
+ sbox.redirected_root_url(temporary=True)
+ '/A',
+ sbox.redirected_root_url(temporary=True)
+ '/A_copied')
+
+ # This tests the cmdline handling of '^/copy-of-A'
+ svntest.actions.run_and_verify_svn(None, None, expected_error,
+ 'cp', '-m', 'failed copy',
+ sbox.redirected_root_url(temporary=True)
+ '/A',
+ '^/copy-of-A')
#----------------------------------------------------------------------
########################################################################