Index: subversion/tests/cmdline/depth_tests.py =================================================================== --- subversion/tests/cmdline/depth_tests.py (revision 26923) +++ subversion/tests/cmdline/depth_tests.py (working copy) @@ -1294,6 +1294,50 @@ '--depth=files', wc) svntest.actions.run_and_verify_svn(None, "Depth: +files", [], "info", wc) +def depth_suppress_externals(sbox): + "ambient depth should suppress svn:externals" # issue #2954 + sbox.build() + wc_dir = sbox.wc_dir + C_path = os.path.join(wc_dir, 'A', 'C') + C_url = sbox.repo_url + "/A/C" + D_url = sbox.repo_url + "/A/D" + + # Commit an svn:externals property on A/C/. + tmp_f = os.tempnam(wc_dir, 'tmp') + svntest.main.file_append(tmp_f, "D_ext %s\n" % D_url) + try: + svntest.actions.run_and_verify_svn(None, None, [], + '--username', svntest.main.wc_author, + '--password', svntest.main.wc_passwd, + 'pset', + '-F', tmp_f, 'svn:externals', C_path) + finally: + os.remove(tmp_f) + expected_output = svntest.wc.State(wc_dir, { + 'A/C' : Item(verb='Sending'), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('A/C', status=' ', wc_rev=2) + svntest.actions.run_and_verify_commit(wc_dir, + expected_output, + expected_status, + None, + None, None, + None, None, wc_dir) + + # Remove the working copy, we're just going to check out $URL/A/C now. + svntest.main.safe_rmtree(wc_dir) + + # Check out just A/C/ as the working copy, with --depth=immediates. + # The externals subdirectory 'D_ext' should not show up, and thus + # the checked-out directory should be empty. + expected_output = wc.State(wc_dir, { }) + expected_disk = wc.State(wc_dir, { }) + svntest.actions.run_and_verify_checkout(C_url, wc_dir, + expected_output, expected_disk, + None, None, None, None, + '--depth', 'files') + #---------------------------------------------------------------------- # list all tests here, starting with None: @@ -1321,6 +1365,7 @@ depth_immediates_receive_new_dir, add_tree_with_depth_files, upgrade_from_above, + depth_suppress_externals, ] if __name__ == "__main__":