You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2014/06/30 12:30:28 UTC

svn commit: r1606674 - in /subversion/trunk/subversion: svn/notify.c svn/util.c tests/cmdline/blame_tests.py tests/cmdline/copy_tests.py tests/cmdline/merge_tests.py tests/cmdline/merge_tree_conflict_tests.py tests/cmdline/switch_tests.py

Author: rhuijben
Date: Mon Jun 30 10:30:27 2014
New Revision: 1606674

URL: http://svn.apache.org/r1606674
Log:
Cleanup a bit of svn notification code and remove an unneeded blank line from
the svn commit output that was caused by the side effects of this code.

Update test results for this changes and include a few cases of the related
r1606182 change.

* subversion/svn/notify.c
  (notify_body): Write the newline here...

* subversion/svn/util.c
  (svn_cl__print_commit_info): ...Instead of waiting for this code.

* subversion/tests/cmdline/blame_tests.py
  (blame_output_after_merge): Update expected result.

* subversion/tests/cmdline/copy_tests.py
  (url_copy_parent_into_child): Update expected result.

* subversion/tests/cmdline/merge_tests.py
  (simple_property_merges,
   merge_old_and_new_revs_from_renamed_file,
   merge_with_auto_rev_range_detection,
   merge_source_normalization_and_subtree_merges,
   merge_added_subtree,
   dont_merge_revs_into_subtree_that_predate_it,
   set_up_renamed_subtree,
   no_self_referential_filtering_on_added_path,
   merge_range_prior_to_rename_source_existence,
   set_up_natural_history_gap): Update expected results.

* subversion/tests/cmdline/merge_tree_conflict_tests.py
  (merge_replace_setup): Update expected results.

* subversion/tests/cmdline/switch_tests.py
  (delete_subdir): Update expected results.

Modified:
    subversion/trunk/subversion/svn/notify.c
    subversion/trunk/subversion/svn/util.c
    subversion/trunk/subversion/tests/cmdline/blame_tests.py
    subversion/trunk/subversion/tests/cmdline/copy_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py
    subversion/trunk/subversion/tests/cmdline/switch_tests.py

Modified: subversion/trunk/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/notify.c?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/notify.c (original)
+++ subversion/trunk/subversion/svn/notify.c Mon Jun 30 10:30:27 2014
@@ -1061,7 +1061,7 @@ notify_body(struct notify_baton *nb,
         {
           SVN_ERR(svn_cmdline_printf(pool, _("done\n")));
         }
-      SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...")));
+      SVN_ERR(svn_cmdline_printf(pool, _("Committing transaction...\n")));
       break;
 
     default:

Modified: subversion/trunk/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Mon Jun 30 10:30:27 2014
@@ -76,7 +76,7 @@ svn_cl__print_commit_info(const svn_comm
                           apr_pool_t *pool)
 {
   if (SVN_IS_VALID_REVNUM(commit_info->revision))
-    SVN_ERR(svn_cmdline_printf(pool, _("\nCommitted revision %ld%s.\n"),
+    SVN_ERR(svn_cmdline_printf(pool, _("Committed revision %ld%s.\n"),
                                commit_info->revision,
                                commit_info->revision == 42 &&
                                getenv("SVN_I_LOVE_PANGALACTIC_GARGLE_BLASTERS")

Modified: subversion/trunk/subversion/tests/cmdline/blame_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/blame_tests.py?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/blame_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/blame_tests.py Mon Jun 30 10:30:27 2014
@@ -656,7 +656,7 @@ def blame_output_after_merge(sbox):
 
   # r4: create branches/br from trunk
   branches_br_url = sbox.repo_url + "/branches/br"
-  svntest.actions.run_and_verify_svn(None, ["\n","Committed revision 4.\n"], [],
+  svntest.actions.run_and_verify_svn(None, ["Committed revision 4.\n"], [],
                                     'cp', '--parents',
                                      trunk_url, branches_br_url,
                                      "-m", "create branch")

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Mon Jun 30 10:30:27 2014
@@ -1095,7 +1095,7 @@ def url_copy_parent_into_child(sbox):
 
   # Issue 1367 parent/child URL-to-URL was rejected.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committed revision 2.\n'], [],
                                      'cp',
                                      '-m', 'a can of worms',
                                      B_url, F_url)

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Mon Jun 30 10:30:27 2014
@@ -686,7 +686,7 @@ def simple_property_merges(sbox):
   A_url = sbox.repo_url + '/A'
   A2_url = sbox.repo_url + '/A2'
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 5.\n'], [],
+                                     ['Committed revision 5.\n'], [],
                                      'copy', '-m', 'copy A to A2',
                                      A_url, A2_url)
 
@@ -8137,7 +8137,7 @@ def merge_old_and_new_revs_from_renamed_
   mu_MOVED_path = sbox.ospath('A/mu_MOVED')
 
   # Copy mu to mu_COPY
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 2.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committed revision 2.\n'],
                                      [], 'cp', '-m', 'cp mu to mu_COPY',
                                      mu_url, mu_COPY_url)
 
@@ -8229,7 +8229,7 @@ def merge_with_auto_rev_range_detection(
                                         expected_status, None, wc_dir)
 
   # Copy A to A_COPY
-  svntest.actions.run_and_verify_svn(None, ['\n', 'Committed revision 3.\n'],
+  svntest.actions.run_and_verify_svn(None, ['Committed revision 3.\n'],
                                      [], 'cp', '-m', 'cp A to A_COPY',
                                      A_url, A_COPY_url)
 
@@ -9149,7 +9149,7 @@ def merge_source_normalization_and_subtr
   wc_disk, wc_status = set_up_branch(sbox)
 
   # r7 - Move A to A_MOVED
-  svntest.actions.run_and_verify_svn(None, ['Committing transaction...',
+  svntest.actions.run_and_verify_svn(None, ['Committing transaction...\n',
                                             'Committed revision 7.\n'],
                                      [], 'mv', '-m', 'mv A to A_MOVED',
                                      sbox.repo_url + '/A',
@@ -10551,11 +10551,9 @@ def merge_added_subtree(sbox):
   A_COPY_url = url + "/A_COPY"
   A_path = sbox.ospath('A')
 
-  svntest.actions.run_and_verify_svn("",["Committing transaction...\n",
-                                         "Committed revision 2.\n"], [],
+  svntest.actions.run_and_verify_svn("",["Committed revision 2.\n"], [],
                                      "cp", "-m", "", A_url, A_COPY_url)
-  svntest.actions.run_and_verify_svn("",["Committing transaction...\n",
-                                         "Committed revision 3.\n"], [],
+  svntest.actions.run_and_verify_svn("",["Committed revision 3.\n"], [],
                                      "cp", "-m", "",
                                      A_COPY_url + '/D',
                                      A_COPY_url + '/D2')
@@ -10814,8 +10812,7 @@ def dont_merge_revs_into_subtree_that_pr
 
   # Copy 'A/D/H' to 'H_COPY' in r6.
   svntest.actions.run_and_verify_svn(None,
-                                     ['Committing transaction...\n',
-                                      'Committed revision 6.\n'],
+                                     ['Committed revision 6.\n'],
                                      [], 'copy',
                                      sbox.repo_url + "/A/D/H",
                                      sbox.repo_url + "/H_COPY",
@@ -10967,8 +10964,7 @@ def set_up_renamed_subtree(sbox):
 
   # Copy 'A/D/H' to 'H_COPY' in r5.
   svntest.actions.run_and_verify_svn(None,
-                                     ['Committing transaction...\n',
-                                      'Committed revision 5.\n'],
+                                     ['Committed revision 5.\n'],
                                      [], 'copy',
                                      sbox.repo_url + "/A/D/H",
                                      sbox.repo_url + "/H_COPY",
@@ -13569,7 +13565,7 @@ def no_self_referential_filtering_on_add
 
   # r10: Move A/C to A/C_MOVED.
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committing transaction...\n',
+                                     ['Committing transaction...\n',
                                       'Committed revision 10.\n'],
                                      [], 'move',
                                      sbox.repo_url + '/A/C',
@@ -13783,8 +13779,7 @@ def merge_range_prior_to_rename_source_e
                                         wc_status, None, wc_dir)
 
   # r12 - Move A/D/H/nu to A/D/H/nu_moved
-  svntest.actions.run_and_verify_svn(None, ["\n",
-                                            "Committing transaction...\n",
+  svntest.actions.run_and_verify_svn(None, ["Committing transaction...\n",
                                             "Committed revision 12.\n"], [],
                                      'move', sbox.repo_url + '/A/D/H/nu',
                                      sbox.repo_url + '/A/D/H/nu_moved',
@@ -14034,18 +14029,19 @@ def set_up_natural_history_gap(sbox):
 
   # r6: Delete 'A'
   exit_code, out, err = svntest.actions.run_and_verify_svn(
-    None, "(Committed revision 6.)|(\n)", [],
+    None, ["Committing transaction...\n",
+           "Committed revision 6.\n"], [],
     'delete', sbox.repo_url + '/A', '-m', 'Delete A')
 
   # r7: Resurrect 'A' by copying 'A@2' to 'A'.
   exit_code, out, err = svntest.actions.run_and_verify_svn(
-    None, "(Committed revision 7.)|(\n)", [],
+    None, ["Committed revision 7.\n"], [],
     'copy', sbox.repo_url + '/A@2', sbox.repo_url + '/A',
     '-m', 'Resurrect A from A@2')
 
   # r8: Branch the resurrected 'A' to 'A_COPY'.
   exit_code, out, err = svntest.actions.run_and_verify_svn(
-    None, "(Committed revision 8.)|(\n)", [],
+    None, ["Committed revision 8.\n"], [],
     'copy', sbox.repo_url + '/A', sbox.repo_url + '/A_COPY',
     '-m', 'Copy A to A_COPY')
 

Modified: subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py Mon Jun 30 10:30:27 2014
@@ -1457,7 +1457,6 @@ def merge_replace_setup(sbox):
   # make a branch of A
   # svn cp $URL/A $URL/branch
   expected_stdout = verify.UnorderedOutput([
-    '\n',
     'Committed revision 2.\n',
   ])
 

Modified: subversion/trunk/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/switch_tests.py?rev=1606674&r1=1606673&r2=1606674&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/switch_tests.py Mon Jun 30 10:30:27 2014
@@ -352,8 +352,7 @@ def delete_subdir(sbox):
   A2_B_F_url = sbox.repo_url + '/A2/B/F'
 
   svntest.actions.run_and_verify_svn(None,
-                                     ['Committing transaction...\n',
-                                      'Committed revision 2.\n'], [],
+                                     ['Committed revision 2.\n'], [],
                                      'cp', '-m', 'make copy', A_url, A2_url)
 
   svntest.actions.run_and_verify_svn(None,
@@ -647,7 +646,6 @@ def obstructed_switch(sbox):
 
   # svn cp -m msgcopy url/A/B/E url/A/B/Esave
   expected_stdout = verify.UnorderedOutput([
-    '\n',
     'Committed revision 2.\n',
   ])
 
@@ -787,7 +785,7 @@ def refresh_read_only_attribute(sbox):
   url = sbox.repo_url + '/A'
   branch_url = sbox.repo_url + '/A-branch'
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committed revision 2.\n'], [],
                                      'cp', '-m', 'svn:needs-lock not set',
                                      url, branch_url)
 
@@ -2043,7 +2041,7 @@ def tolerate_local_mods(sbox):
   A2_url = sbox.repo_url + '/A2'
 
   svntest.actions.run_and_verify_svn(None,
-                                     ['\n', 'Committed revision 2.\n'], [],
+                                     ['Committed revision 2.\n'], [],
                                      'cp', '-m', 'make copy', A_url, A2_url)
 
   os.mkdir(L_path)