Index: subversion/tests/cmdline/svntest/actions.py =================================================================== --- subversion/tests/cmdline/svntest/actions.py (revision 20154) +++ subversion/tests/cmdline/svntest/actions.py (working copy) @@ -129,6 +129,22 @@ # make the repos world-writeable, for mod_dav_svn's sake. main.chmod_tree(path, 0666, 0666) + # If there's no pristine wc, create one. + if not os.path.exists(main.pristine_wc_dir): + # Generate the expected output tree. + expected_output = main.greek_state.copy() + expected_output.wc_dir = main.pristine_wc_dir + expected_output.tweak(status='A ', contents=None) + + # 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.test_area_url + '/' + main.pristine_dir, + main.pristine_wc_dir, + expected_output, + expected_wc) + def run_and_verify_svnversion(message, wc_dir, repo_url, expected_stdout, expected_stderr): "Run svnversion command and check its output" @@ -890,19 +906,14 @@ guarantee_greek_repository(sbox.repo_dir) 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) + # copy the pristine wc and relocate it to our new repository. + duplicate_dir(main.pristine_wc_dir, sbox.wc_dir) - # 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) + output, errput = main.run_svn (None, 'switch', '--relocate', + '--username', main.wc_author, + '--password', main.wc_passwd, + main.test_area_url + '/' + main.pristine_dir, + main.current_repo_url, sbox.wc_dir) else: # just make sure the parent folder of our working copy is created try: Index: subversion/tests/cmdline/svntest/main.py =================================================================== --- subversion/tests/cmdline/svntest/main.py (revision 20154) +++ subversion/tests/cmdline/svntest/main.py (working copy) @@ -158,6 +158,7 @@ pristine_dir = os.path.join(temp_dir, "repos") greek_dump_dir = os.path.join(temp_dir, "greekfiles") config_dir = os.path.abspath(os.path.join(temp_dir, "config")) +pristine_wc_dir = os.path.join(temp_dir, "wc") default_config_dir = config_dir @@ -447,64 +448,67 @@ def copy_repos(src_path, dst_path, head_revision, ignore_uuid = 0): "Copy the repository SRC_PATH, with head revision HEAD_REVISION, to DST_PATH" - # A BDB hot-backup procedure would be more efficient, but that would - # require access to the BDB tools, and this doesn't. Print a fake - # pipe command so that the displayed CMDs can be run by hand - create_repos(dst_path) - dump_args = ' dump "' + src_path + '"' - load_args = ' load "' + dst_path + '"' - - if ignore_uuid: - load_args = load_args + " --ignore-uuid" - if verbose_mode: - print 'CMD:', os.path.basename(svnadmin_binary) + dump_args, \ - '|', os.path.basename(svnadmin_binary) + load_args, - start = time.time() - dump_in, dump_out, dump_err = os.popen3(svnadmin_binary + dump_args, 'b') - load_in, load_out, load_err = os.popen3(svnadmin_binary + load_args, 'b') - stop = time.time() - if verbose_mode: - print '