While working on issue 3830 i noticed the following behavior of svn log.
In the test repository used in log_tests.py the path "A/D/G/rho" is: - created in revision 1 - deleted in revision 5 - recreated in revision 8 The following commands result in the expected error "Unable to find repository location for": svn log -r 2:9 path-to-wc/A/D/G/rho@2 svn log -r 9:2 path-to-wc/A/D/G/rho@2 But when using HEAD instead of revision 9 (which should be the same) the commands: svn log -r 2:HEAD path-to-wc/A/D/G/rho@2 svn log -r HEAD:2 path-to-wc/A/D/G/rho@2 actually show the log of the wrong resource - namely A/D/G/rho@8. This looks like bug to me. I have added another test to log_tests.py which therefore currently fails. Can anybody comment on this and verify that this is a bug which should be fixed? Dirk
Index: tests/cmdline/log_tests.py =================================================================== --- tests/cmdline/log_tests.py (revision 1129130) +++ tests/cmdline/log_tests.py (working copy) @@ -1973,6 +1973,39 @@ log_chain = parse_log_output(out) check_merge_results(log_chain, expected_merges) +#---------------------------------------------------------------------- +def log_unrelated(sbox): + "'svn log -rM:N PEG', where M/N is unrelated to PEG" + + guarantee_repos_and_wc(sbox) + + unknown_location = ".*Unable to find repository location for.*" + + target = os.path.join(sbox.repo_url, 'A', 'D', 'G', 'rho') + "@2" + + # log for /A/D/G/rho, deleted in revision 5, recreated in revision 8 + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, unknown_location, + 'log', '-r', '2:9', target) + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, unknown_location, + 'log', '-r', '9:2', target) + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, unknown_location, + 'log', '-r', '2:HEAD', target) + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, unknown_location, + 'log', '-r', 'HEAD:2', target) + + file_not_found = ".*File not found.*" + + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, file_not_found, + 'log', '-r', '6:7', target) + exit_code, output, err = svntest.actions.run_and_verify_svn( + None, None, file_not_found, + 'log', '-r', '7:6', target) + ######################################################################## # Run the tests @@ -2010,6 +2043,7 @@ log_of_local_copy, merge_sensitive_log_reverse_merges, merge_sensitive_log_ignores_cyclic_merges, + log_unrelated, ] if __name__ == '__main__':