Re: [PATCH] Re: [Issue 816] - Silent failure in svn log -r (fwd)
From: Kieran <kieran_at_esperi.demon.co.uk>
Date: 2002-07-30 06:24:49 CEST
On 29 Jul 2002, Philip Martin wrote:
> Later in this function there is code that handles a new repository
The following addition to
It removes and re-creates an empty repository, checks it out, then runs
It occurs to me that it might be worth creating a
Regards
Kieran
-- * subversion/tests/clients/cmdline/log_tests.py: Added log_with_empty_repos This creates an absolutely empty, untouched repository, then checks that "svn log" works on it without errors Index: subversion/tests/clients/cmdline/log_tests.py =================================================================== --- subversion/tests/clients/cmdline/log_tests.py +++ subversion/tests/clients/cmdline/log_tests.py Tue Jul 30 05:08:09 2002 @@ -392,6 +392,43 @@ os.chdir (was_cwd) return 0 +# Simple-minded test to check "svn log" on the degenerate +# case with an empty repository +def log_with_empty_repos(sbox): + "'svn log' with an empty repository" + + # Create wc_dir and repo_dir + if os.path.exists(sbox.wc_dir): + svntest.main.remove_wc (sbox.wc_dir) + os.makedirs (sbox.wc_dir) + + if os.path.exists (sbox.repo_dir): + svntest.main.remove_wc (sbox.repo_dir) + os.makedirs (sbox.repo_dir) + + # Create virgin repos + svntest.main.create_repos (sbox.repo_dir) + + + was_cwd = os.getcwd () + os.chdir (sbox.wc_dir) + + url = "file:///" + was_cwd + "/" + sbox.repo_dir + + stdout_lines, stderr_lines = \ + svntest.main.run_svn (None, "checkout", url, ".") + + if (len(stderr_lines) != 0): + os.chdir (was_cwd) + return 1 + + stdout_lines, stderr_lines = svntest.main.run_svn (None, "log") + + if (len(stderr_lines) != 0): + os.chdir (was_cwd) + return 1 + os.chdir (was_cwd) + return 0 ######################################################################## # Run the tests @@ -401,6 +438,7 @@ test_list = [ None, plain_log, versioned_log_message, + log_with_empty_repos, ] if __name__ == '__main__': --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Tue Jul 30 06:30:59 2002 |
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.