On Thu, Mar 05, 2015 at 04:09:11PM -0800, Ben Reser wrote: > The 1.9.0-beta1 release artifacts are now available for testing/signing.
I was testing this from within a directory named subversion-1.9.0~beta1 and a number of tests failed due to differences in whether the ~ was URL-escaped. The attached patch fixes the issue for me. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>
Fix test failures when running from a directory whose name contains characters
which must be escaped in a URL.
svn is more lenient about which characters need escaping, so use of urllib's
pathname2url to create expected results causes test failures.
* subversion/tests/cmdline/svnsync_authz_tests.py
(copy_delete_unreadable_child): Use svntest.wc.svn_uri_quote
* subversion/tests/cmdline/svnsync_tests.py
(setup_and_sync): Use svntest.wc.svn_uri_quote
* subversion/tests/cmdline/svntest/main.py
(_create_parser, execute_tests): Use svntest.wc.svn_uri_quote
* subversion/tests/cmdline/svntest/sandbox.py
(_set_name, add_repo_path): Use svntest.wc.svn_uri_quote
Index: subversion/tests/cmdline/svnsync_authz_tests.py
===================================================================
--- subversion/tests/cmdline/svnsync_authz_tests.py (revision 1664784)
+++ subversion/tests/cmdline/svnsync_authz_tests.py (working copy)
@@ -30,7 +30,7 @@
import sys, os
# Test suite-specific modules
-import locale, re, urllib
+import locale, re
# Our testing module
import svntest
@@ -472,7 +472,7 @@ def copy_delete_unreadable_child(sbox):
})
dest_url = svntest.main.file_scheme_prefix \
- + urllib.pathname2url(os.path.abspath(dest_sbox.repo_dir))
+ + svntest.wc.svn_uri_quote(os.path.abspath(dest_sbox.repo_dir))
run_init(dest_url, sbox.repo_url)
run_sync(dest_url)
Index: subversion/tests/cmdline/svnsync_tests.py
===================================================================
--- subversion/tests/cmdline/svnsync_tests.py (revision 1664784)
+++ subversion/tests/cmdline/svnsync_tests.py (working copy)
@@ -28,7 +28,7 @@
import sys, os
# Test suite-specific modules
-import re, urllib
+import re
# Our testing module
import svntest
@@ -132,7 +132,7 @@ def setup_and_sync(sbox, dump_file_contents, subdi
cwd = os.getcwd()
if is_src_ra_local:
repo_url = svntest.main.file_scheme_prefix + \
- urllib.pathname2url(os.path.join(cwd, sbox.repo_dir))
+ svntest.wc.svn_uri_quote(os.path.join(cwd, sbox.repo_dir))
if subdir:
repo_url = repo_url + subdir
@@ -140,7 +140,7 @@ def setup_and_sync(sbox, dump_file_contents, subdi
dest_repo_url = dest_sbox.repo_url
if is_dest_ra_local:
dest_repo_url = svntest.main.file_scheme_prefix + \
- urllib.pathname2url(os.path.join(cwd, dest_sbox.repo_dir))
+ svntest.wc.svn_uri_quote(os.path.join(cwd, dest_sbox.repo_dir))
run_init(dest_repo_url, repo_url, source_prop_encoding)
run_sync(dest_repo_url, repo_url,
Index: subversion/tests/cmdline/svntest/main.py
===================================================================
--- subversion/tests/cmdline/svntest/main.py (revision 1664784)
+++ subversion/tests/cmdline/svntest/main.py (working copy)
@@ -1980,7 +1980,7 @@ def _create_parser():
parser.set_defaults(
server_minor_version=SVN_VER_MINOR,
url=file_scheme_prefix + \
- urllib.pathname2url(os.path.abspath(os.getcwd())),
+ svntest.wc.svn_uri_quote(os.path.abspath(os.getcwd())),
http_library=_default_http_library)
return parser
@@ -2229,7 +2229,7 @@ def execute_tests(test_list, serial_only = False,
# Calculate pristine_greek_repos_url from test_area_url.
pristine_greek_repos_url = options.test_area_url + '/' + \
- urllib.pathname2url(pristine_greek_repos_dir)
+ svntest.wc.svn_uri_quote(pristine_greek_repos_dir)
if options.use_jsvn:
if options.svn_bin is None:
Index: subversion/tests/cmdline/svntest/sandbox.py
===================================================================
--- subversion/tests/cmdline/svntest/sandbox.py (revision 1664784)
+++ subversion/tests/cmdline/svntest/sandbox.py (working copy)
@@ -24,7 +24,6 @@
import os
import shutil
import copy
-import urllib
import logging
import re
@@ -114,7 +113,7 @@ class Sandbox:
if empty or not read_only: # use a local repo
self.repo_dir = os.path.join(svntest.main.general_repo_dir, self.name)
self.repo_url = (svntest.main.options.test_area_url + '/'
- + urllib.pathname2url(self.repo_dir))
+ + svntest.wc.svn_uri_quote(self.repo_dir))
self.add_test_path(self.repo_dir)
else:
self.repo_dir = svntest.main.pristine_greek_repos_dir
@@ -195,7 +194,7 @@ class Sandbox:
path = (os.path.join(svntest.main.general_repo_dir, self.name)
+ '.' + suffix)
url = svntest.main.options.test_area_url + \
- '/' + urllib.pathname2url(path)
+ '/' + svntest.wc.svn_uri_quote(path)
self.add_test_path(path, remove)
return path, url
signature.asc
Description: Digital signature

