[[[ Add a regression test for r1348822.
* subversion/tests/cmdline/stat_tests.py (status_depth_update_local_modifications): Add a test for "svn status -u" call with different --depth values on a working copy with local modifications. ]]]
Index: subversion/tests/cmdline/stat_tests.py =================================================================== --- subversion/tests/cmdline/stat_tests.py (revision 1349043) +++ subversion/tests/cmdline/stat_tests.py (working copy) @@ -1960,6 +1960,82 @@ def status_not_present(sbox): sbox.ospath('A/mu'), sbox.ospath('no-file')) +def status_depth_update_local_modifications(sbox): + "run 'status --depth=X -u' with local changes" + + sbox.build() + wc_dir = sbox.wc_dir + A_path = sbox.ospath('A') + D_path = os.path.join(A_path, 'D') + + mu_path = os.path.join(A_path, 'mu') + gamma_path = os.path.join(D_path, 'gamma') + + svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path) + svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path) + + svntest.main.file_append(mu_path, 'modified') + svntest.main.file_append(gamma_path, 'modified') + + # depth=empty + expected = svntest.verify.UnorderedOutput( + [" M 1 %s\n" % A_path, + "Status against revision: 1\n"]) + + svntest.actions.run_and_verify_svn(None, + expected, + [], + "status", "-u", "--depth=empty", A_path) + + expected = svntest.verify.UnorderedOutput( + ["M 1 %s\n" % mu_path, + "Status against revision: 1\n"]) + + svntest.actions.run_and_verify_svn(None, + expected, + [], + "status", "-u", "--depth=empty", mu_path) + + # depth=files + expected = svntest.verify.UnorderedOutput( + ["M 1 %s\n" % mu_path, + " M 1 %s\n" % A_path, + "Status against revision: 1\n"]) + + svntest.actions.run_and_verify_svn(None, + expected, + [], + "status", "-u", "--depth=files", + A_path) + + # depth=immediates + expected = svntest.verify.UnorderedOutput( + [" M 1 %s\n" % A_path, + " M 1 %s\n" % D_path, + "M 1 %s\n" % mu_path, + "Status against revision: 1\n"]) + + svntest.actions.run_and_verify_svn(None, + expected, + [], + "status", "-u", "--depth=immediates", + A_path) + + # depth=infinity (the default) + expected = svntest.verify.UnorderedOutput( + [" M 1 %s\n" % A_path, + " M 1 %s\n" % D_path, + "M 1 %s\n" % mu_path, + "M 1 %s\n" % gamma_path, + "Status against revision: 1\n"]) + + svntest.actions.run_and_verify_svn(None, + expected, + [], + "status", "-u", "--depth=infinity", + A_path) + + ######################################################################## # Run the tests @@ -2003,6 +2079,7 @@ test_list = [ None, wclock_status, modified_modulo_translation, status_not_present, + status_depth_update_local_modifications ] if __name__ == '__main__':