Index: subversion/tests/cmdline/authz_tests.py =================================================================== --- subversion/tests/cmdline/authz_tests.py (revision 19635) +++ subversion/tests/cmdline/authz_tests.py (working copy) @@ -130,7 +130,7 @@ def broken_authz_file(sbox): "broken authz files cause errors" - sbox.build() + sbox.build(create_wc = False) skip_test_when_no_authz_available() @@ -157,8 +157,7 @@ skip_test_when_no_authz_available() - sbox.build("authz_read_access") - wc_dir = sbox.wc_dir + sbox.build("authz_read_access", create_wc = False) write_restrictive_svnserve_conf(svntest.main.current_repo_dir) @@ -313,8 +312,7 @@ skip_test_when_no_authz_available() - sbox.build("authz_write_access") - wc_dir = sbox.wc_dir + sbox.build("authz_write_access", create_wc = False) write_restrictive_svnserve_conf(svntest.main.current_repo_dir) @@ -444,8 +442,8 @@ skip_test_when_no_authz_available() - sbox.build("authz_checkout_test") - wc_dir = sbox.wc_dir + sbox.build("authz_checkout_test", create_wc = False) + local_dir = sbox.wc_dir write_restrictive_svnserve_conf(svntest.main.current_repo_dir) @@ -465,11 +463,9 @@ fp.close() - # checkout a second working copy, should fail - wc2_dir = sbox.wc_dir + '2' - + # checkout a working copy, should fail svntest.actions.run_and_verify_svn(None, None, expected_err, - 'co', sbox.repo_url, wc2_dir) + 'co', sbox.repo_url, local_dir) # 2nd part: now enable read access @@ -487,16 +483,16 @@ fp.close() - # checkout a second working copy, should succeed because we have read + # checkout a working copy, should succeed because we have read # access expected_output = svntest.main.greek_state.copy() - expected_output.wc_dir = wc2_dir + expected_output.wc_dir = local_dir expected_output.tweak(status='A ', contents=None) expected_wc = svntest.main.greek_state svntest.actions.run_and_verify_checkout(sbox.repo_url, - wc2_dir, + local_dir, expected_output, expected_wc) Index: subversion/tests/cmdline/basic_tests.py =================================================================== --- subversion/tests/cmdline/basic_tests.py (revision 19635) +++ subversion/tests/cmdline/basic_tests.py (working copy) @@ -1508,17 +1508,16 @@ def uri_syntax(sbox): 'make sure URI syntaxes are parsed correctly' - sbox.build() - wc_dir = sbox.wc_dir + sbox.build(create_wc = False) + local_dir = sbox.wc_dir # Revision 6638 made 'svn co http://host' seg fault, this tests the fix. - svntest.main.safe_rmtree(wc_dir) url = svntest.main.current_repo_url scheme = url[:string.find(url, ":")] url = scheme + "://some_nonexistent_host_with_no_trailing_slash" svntest.actions.run_and_verify_svn("No error where one expected", None, SVNAnyOutput, - 'co', url, wc_dir) + 'co', url, local_dir) # Different RA layers give different errors for failed checkouts; # for us, it's only important to know that it _did_ error (as Index: subversion/tests/cmdline/cat_tests.py =================================================================== --- subversion/tests/cmdline/cat_tests.py (revision 19635) +++ subversion/tests/cmdline/cat_tests.py (working copy) @@ -6,7 +6,7 @@ # See http://subversion.tigris.org for more information. # # ==================================================================== -# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# Copyright (c) 2000-2006 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -48,7 +48,7 @@ def cat_remote_directory(sbox): "cat a remote directory" - sbox.build() + sbox.build(create_wc = False) A_url = svntest.main.current_repo_url + '/A' Index: subversion/tests/cmdline/copy_tests.py =================================================================== --- subversion/tests/cmdline/copy_tests.py (revision 19635) +++ subversion/tests/cmdline/copy_tests.py (working copy) @@ -1090,7 +1090,7 @@ def copy_to_root(sbox): 'copy item to root of repository' - sbox.build() + sbox.build(create_wc = False) root = svntest.main.current_repo_url mu = root + '/A/mu' @@ -1497,7 +1497,7 @@ sbox.build() wc_dir = sbox.wc_dir - + base_url = svntest.main.current_repo_url + '/base' svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', '-m', 'mybase', @@ -1657,8 +1657,7 @@ def url_to_non_existent_url_path(sbox): "svn cp src-URL non-existent-URL-path" - sbox.build() - wc_dir = sbox.wc_dir + sbox.build(create_wc = False) dirURL1 = svntest.main.current_repo_url + "/A/B/E" dirURL2 = svntest.main.current_repo_url + "/G/C/E/I" @@ -1688,7 +1687,7 @@ def non_existent_url_to_url(sbox): "svn cp oldrev-of-deleted-URL URL" - sbox.build() + sbox.build(create_wc = False) adg_url = svntest.main.current_repo_url + '/A/D/G' pi_url = svntest.main.current_repo_url + '/A/D/G/pi' @@ -1705,7 +1704,7 @@ def old_dir_url_to_url(sbox): "test URL to URL copying edge case" - sbox.build() + sbox.build(create_wc = False) adg_url = svntest.main.current_repo_url + '/A/D/G' pi_url = svntest.main.current_repo_url + '/A/D/G/pi' Index: subversion/tests/cmdline/diff_tests.py =================================================================== --- subversion/tests/cmdline/diff_tests.py (revision 19635) +++ subversion/tests/cmdline/diff_tests.py (working copy) @@ -807,7 +807,7 @@ def diff_nonextant_urls(sbox): "svn diff errors against a non-existent URL" - sbox.build() + sbox.build(create_wc = False) non_extant_url = sbox.repo_url + '/A/does_not_exist' extant_url = sbox.repo_url + '/A/mu' Index: subversion/tests/cmdline/export_tests.py =================================================================== --- subversion/tests/cmdline/export_tests.py (revision 19635) +++ subversion/tests/cmdline/export_tests.py (working copy) @@ -39,7 +39,7 @@ def export_empty_directory(sbox): "export an empty directory" - sbox.build() + sbox.build(create_wc = False) svntest.main.safe_rmtree(sbox.wc_dir) export_target = sbox.wc_dir @@ -50,7 +50,7 @@ def export_greek_tree(sbox): "export the greek tree" - sbox.build() + sbox.build(create_wc = False) svntest.main.safe_rmtree(sbox.wc_dir) export_target = sbox.wc_dir Index: subversion/tests/cmdline/externals_tests.py =================================================================== --- subversion/tests/cmdline/externals_tests.py (revision 19635) +++ subversion/tests/cmdline/externals_tests.py (working copy) @@ -6,7 +6,7 @@ # See http://subversion.tigris.org for more information. # # ==================================================================== -# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# Copyright (c) 2000-2006 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -68,9 +68,10 @@ remove a previous incarnation of the other repository. """ - sbox.build() + # The test itself will create a working copy + sbox.build(create_wc = False) - svntest.main.safe_rmtree(sbox.wc_dir) # The test itself will recreate this + svntest.main.safe_rmtree(sbox.wc_dir) wc_init_dir = sbox.add_wc_path('init') # just for setting up props repo_dir = sbox.repo_dir Index: subversion/tests/cmdline/svnadmin_tests.py =================================================================== --- subversion/tests/cmdline/svnadmin_tests.py (revision 19635) +++ subversion/tests/cmdline/svnadmin_tests.py (working copy) @@ -6,7 +6,7 @@ # See http://subversion.tigris.org for more information. # # ==================================================================== -# Copyright (c) 2000-2004 CollabNet. All rights reserved. +# Copyright (c) 2000-2006 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -299,7 +299,7 @@ def dump_quiet(sbox): "'svnadmin dump --quiet'" - sbox.build() + sbox.build(create_wc = False) output, errput = svntest.main.run_svnadmin("dump", sbox.repo_dir, '--quiet') svntest.actions.compare_and_display_lines( Index: subversion/tests/cmdline/svntest/actions.py =================================================================== --- subversion/tests/cmdline/svntest/actions.py (revision 19635) +++ subversion/tests/cmdline/svntest/actions.py (working copy) @@ -16,7 +16,7 @@ # ###################################################################### -import os.path, shutil, string, re, sys +import os.path, shutil, string, re, sys, errno import main, tree, wc # general svntest routines in this module. from svntest import Failure, SVNAnyOutput @@ -794,7 +794,7 @@ # This allows a test to *quickly* bootstrap itself. -def make_repo_and_wc(sbox): +def make_repo_and_wc(sbox, create_wc = True): """Create a fresh repository and checkout a wc from it. The repo and wc directories will both be named TEST_NAME, and @@ -808,21 +808,28 @@ # Create (or copy afresh) a new repos with a greek tree in it. guarantee_greek_repository(sbox.repo_dir) - # Generate the expected output tree. - expected_output = main.greek_state.copy() - expected_output.wc_dir = sbox.wc_dir - expected_output.tweak(status='A ', contents=None) + if create_wc: + # Generate the expected output tree. + expected_output = main.greek_state.copy() + expected_output.wc_dir = sbox.wc_dir + expected_output.tweak(status='A ', contents=None) - # Generate an expected wc tree. - expected_wc = main.greek_state + # Generate an expected wc tree. + expected_wc = main.greek_state - # Do a checkout, and verify the resulting output and disk contents. - run_and_verify_checkout(main.current_repo_url, - sbox.wc_dir, - expected_output, - expected_wc) + # Do a checkout, and verify the resulting output and disk contents. + run_and_verify_checkout(main.current_repo_url, + sbox.wc_dir, + expected_output, + expected_wc) + else: + # just make sure the parent folder of our working copy is created + try: + os.mkdir(main.general_wc_dir) + except OSError, err: + if err.errno != errno.EEXIST: + raise - # Duplicate a working copy or other dir. def duplicate_dir(wc_name, wc_copy_name): """Copy the working copy WC_NAME to WC_COPY_NAME. Overwrite any Index: subversion/tests/cmdline/svntest/main.py =================================================================== --- subversion/tests/cmdline/svntest/main.py (revision 19635) +++ subversion/tests/cmdline/svntest/main.py (working copy) @@ -596,10 +596,10 @@ self.dependents[-1]._set_name("%s-%d" % (self.name, len(self.dependents))) return self.dependents[-1] - def build(self, name = None): + def build(self, name = None, create_wc = True): if name != None: self._set_name(name) - if actions.make_repo_and_wc(self): + if actions.make_repo_and_wc(self, create_wc): raise Failure("Could not build repository and sandbox '%s'" % self.name) def add_test_path(self, path, remove=1):