Index: log_tests.py =================================================================== --- log_tests.py (revision 14458) +++ log_tests.py (working copy) @@ -91,8 +91,11 @@ # is done for that. # Revision 2: edit iota + msg=""" Log message for revision 2 + but with multiple lines + to test the code""" svntest.main.file_append (iota_path, "2") - svntest.main.run_svn (None, 'ci', '-m', "Log message for revision 2") + svntest.main.run_svn (None, 'ci', '-m', msg) svntest.main.run_svn (None, 'up') # Revision 3: edit A/D/H/omega, A/D/G/pi, A/D/G/rho, and A/B/E/alpha @@ -104,10 +107,13 @@ svntest.main.run_svn (None, 'up') # Revision 4: edit iota again, add A/C/epsilon + msg=""" Log message for revision 4 + but with multiple lines + to test the code""" svntest.main.file_append (iota_path, "4") svntest.main.file_append (epsilon_path, "4") svntest.main.run_svn (None, 'add', epsilon_path) - svntest.main.run_svn (None, 'ci', '-m', "Log message for revision 4") + svntest.main.run_svn (None, 'ci', '-m', msg) svntest.main.run_svn (None, 'up') # Revision 5: edit A/C/epsilon, delete A/D/G/rho @@ -117,9 +123,12 @@ svntest.main.run_svn (None, 'up') # Revision 6: prop change on A/B, edit A/D/H/psi + msg=""" Log message for revision 6 + but with multiple lines + to test the code""" svntest.main.run_svn (None, 'ps', 'blue', 'azul', B_path) svntest.main.file_append (psi_path, "6") - svntest.main.run_svn (None, 'ci', '-m', "Log message for revision 6") + svntest.main.run_svn (None, 'ci', '-m', msg) svntest.main.run_svn (None, 'up') # Revision 7: edit A/mu, prop change on A/mu @@ -129,10 +138,13 @@ svntest.main.run_svn (None, 'up') # Revision 8: edit iota yet again, re-add A/D/G/rho + msg=""" Log message for revision 8 + but with multiple lines + to test the code""" svntest.main.file_append (iota_path, "8") svntest.main.file_append (rho_path, "8") svntest.main.run_svn (None, 'add', rho_path) - svntest.main.run_svn (None, 'ci', '-m', "Log message for revision 8") + svntest.main.run_svn (None, 'ci', '-m', msg) svntest.main.run_svn (None, 'up') # Revision 9: edit A/B/E/beta, delete A/B/E/alpha @@ -183,7 +195,7 @@ 'author' ===> string 'date' ===> string 'msg' ===> string (the log message itself) - + 'line' ===> number (so that it may be checked against rev) If LOG_LINES contains changed-path information, then the hash also contains @@ -237,6 +249,7 @@ this_item['author'] = match.group(2) this_item['date'] = match.group(3) lines = string.atoi ((match.group (4))) + this_item['lines'] = lines # Eat the expected blank line. log_lines.pop (0) @@ -295,6 +308,11 @@ if (not (author_re.search (author) or author == '' or author == '(no author)')): raise svntest.Failure + # if revision is an even number then it should have + # a three line log message + # but don't try to do anything fancy as the todo below suggests + if(saw_rev%2==0 and log_item['lines']!=3):raise svntest.Failure + # Check that the log message looks right: msg_re = re.compile ('Log message for revision ' + `saw_rev`) if (not msg_re.search (msg)): raise svntest.Failure @@ -462,24 +480,36 @@ mu2_path = os.path.join (wc_dir, 'A', 'mu2') mu_URL = svntest.main.current_repo_url + '/A/mu' mu2_URL = svntest.main.current_repo_url + '/A/mu2' + + msg2=""" Log message for revision 2 + but with multiple lines + to test the code""" + + msg4=""" Log message for revision 4 + but with multiple lines + to test the code""" + msg6=""" Log message for revision 6 + but with multiple lines + to test the code""" + svntest.main.file_append (mu_path, "2") svntest.actions.run_and_verify_svn (None, None, [], 'ci', wc_dir, - '-m', "Log message for revision 2") + '-m', msg2) svntest.main.file_append (mu2_path, "this is mu2") svntest.actions.run_and_verify_svn (None, None, [], 'add', mu2_path) svntest.actions.run_and_verify_svn (None, None, [], 'ci', wc_dir, '-m', "Log message for revision 3") svntest.actions.run_and_verify_svn (None, None, [], 'rm', mu2_path) svntest.actions.run_and_verify_svn (None, None, [], 'ci', wc_dir, - '-m', "Log message for revision 4") + '-m', msg4) svntest.main.file_append (mu_path, "5") svntest.actions.run_and_verify_svn (None, None, [], 'ci', wc_dir, '-m', "Log message for revision 5") svntest.actions.run_and_verify_svn (None, None, [], 'cp', '-r', '5', mu_URL, mu2_URL, - '-m', "Log message for revision 6") + '-m', msg6) svntest.actions.run_and_verify_svn (None, None, [], 'up', wc_dir) # The full log for mu2 is relatively unsurprising