subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1428996 - in /subversion/trunk/subversion/tests/cmdline: merge_authz_tests.py merge_reintegrate_tests.py merge_tests.py merge_tree_conflict_tests.py patch_tests.py svntest/wc.py
Date Fri, 04 Jan 2013 17:43:32 GMT
Author: pburba
Date: Fri Jan  4 17:43:31 2013
New Revision: 1428996

URL: http://svn.apache.org/viewvc?rev=1428996&view=rev
Log:
Teach test suite to detect nested 'Skipped' notifications.  See
http://svn.haxx.se/dev/archive-2013-01/0035.shtml

* subversion/tests/cmdline/svntest/wc.py

  (_re_parse_skipped): Add a new group to the regex which matches the
   'Skipped', 'Skipped target', and 'Skipped missing target' notifications.

  (State.from_skipped): Initialize StateItem with a verb corresponding to the
   variants of the skip notifications.

* subversion/tests/cmdline/merge_authz_tests.py

  (mergeinfo_and_skipped_paths): Add appropriate verb to expected skip(s).

* subversion/tests/cmdline/merge_reintegrate_tests.py

  (reintegrate_on_shallow_wc): Add appropriate verb to expected
   skip(s).

* subversion/tests/cmdline/merge_tests.py

  (merge_skips_obstructions,
   merge_into_missing,
   skipped_files_get_correct_mergeinfo): Add appropriate verb to expected
   skip(s).

  (merge_to_sparse_directories): As above, but also add expected skip
   notifications that we previously missed and still allowed the test to
   pass.

* subversion/tests/cmdline/merge_tree_conflict_tests.py

  (tree_conflicts_and_obstructions,
   tree_conflicts_merge_edit_onto_missing,
   tree_conflicts_merge_del_onto_missing): Add appropriate verb to
   expected skip(s).

* subversion/tests/cmdline/patch_tests.py

  (patch_absolute_paths,
   patch_add_new_dir,
   patch_same_twice,
   patch_delete_and_skip): Add appropriate verb to expected skip(s).

Modified:
    subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_reintegrate_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/patch_tests.py
    subversion/trunk/subversion/tests/cmdline/svntest/wc.py

Modified: subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py?rev=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py Fri Jan  4 17:43:31 2013
@@ -184,7 +184,7 @@ def mergeinfo_and_skipped_paths(sbox):
     'C'         : Item(),
     })
   expected_skip = wc.State(A_COPY_path, {
-    'B/E'       : Item(),
+    'B/E'       : Item(verb='Skipped missing target'),
     })
   svntest.actions.run_and_verify_merge(A_COPY_path, '4', '8',
                                        sbox.repo_url + '/A', None,
@@ -256,9 +256,9 @@ def mergeinfo_and_skipped_paths(sbox):
     'C'         : Item(),
     })
   expected_skip = wc.State(A_COPY_2_path, {
-    'B/E'              : Item(),
-    'D/G/rho'          : Item(),
-    'D/H/psi'          : Item(),
+    'B/E'     : Item(verb='Skipped missing target'),
+    'D/G/rho' : Item(verb='Skipped'),
+    'D/H/psi' : Item(verb='Skipped missing target'),
     })
   svntest.actions.run_and_verify_merge(A_COPY_2_path, '4', '8',
                                        sbox.repo_url + '/A', None,
@@ -323,7 +323,8 @@ def mergeinfo_and_skipped_paths(sbox):
     'mu'        : Item("This is the file 'mu'.\n"),
     'C'         : Item(),
     })
-  expected_skip = wc.State(A_COPY_3_path, {'B/E' : Item()})
+  expected_skip = wc.State(A_COPY_3_path,
+                           {'B/E' : Item(verb='Skipped missing target')})
   svntest.actions.run_and_verify_merge(A_COPY_3_path, '5', '7',
                                        sbox.repo_url + '/A', None,
                                        expected_output,
@@ -361,7 +362,7 @@ def mergeinfo_and_skipped_paths(sbox):
     'chi'   : Item("This is the file 'chi'.\n"),
     })
   expected_skip = wc.State(A_COPY_2_H_path, {
-    'psi'   : Item(),
+    'psi'   : Item(verb='Skipped missing target'),
     })
   # Note we don't bother checking expected mergeinfo output because the
   # multiple merges being performed here, -c5 and -c8, will result in
@@ -470,7 +471,7 @@ def mergeinfo_and_skipped_paths(sbox):
                    props={SVN_PROP_MERGEINFO : '/A/D/H/zeta:9'}),
     })
   expected_skip = wc.State(A_COPY_2_H_path, {
-    'psi' : Item(),
+    'psi' : Item(verb='Skipped missing target'),
     })
   svntest.actions.run_and_verify_merge(A_COPY_2_H_path, '4', '9',
                                        sbox.repo_url + '/A/D/H', None,

Modified: subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py?rev=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_reintegrate_tests.py Fri Jan  4 17:43:31
2013
@@ -832,7 +832,7 @@ def reintegrate_on_shallow_wc(sbox):
   expected_A_disk.tweak('D', props={SVN_PROP_MERGEINFO : '/A_COPY/D:2-4*'})
   # ... a depth-restricted item is skipped ...
   expected_A_skip.add({
-      'D/H/psi' : Item()
+      'D/H/psi' : Item(verb='Skipped')
   })
   # Currently this fails due to r1424469.  For a full explanation see
   # http://svn.haxx.se/dev/archive-2012-12/0472.shtml

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Fri Jan  4 17:43:31 2013
@@ -1490,7 +1490,7 @@ def merge_skips_obstructions(sbox):
     'Q/bar'  : Item(status='  ', wc_rev='-', copied='+'),
     })
   expected_skip = wc.State(C_path, {
-    'foo' : Item(),
+    'foo' : Item(verb='Skipped'),
     })
   # Unversioned:
   svntest.main.file_append(os.path.join(C_path, "foo"), "foo")
@@ -1534,8 +1534,8 @@ def merge_skips_obstructions(sbox):
     'foo'  : Item(status='A ', wc_rev='-', copied='+'),
     })
   expected_skip = wc.State(C_path, {
-    'Q'     : Item(),
-    'Q/bar' : Item(),
+    'Q'     : Item(verb='Skipped'),
+    'Q/bar' : Item(verb='Skipped'),
     })
 
   svntest.actions.run_and_verify_merge(C_path, '1', '2', F_url, None,
@@ -1595,8 +1595,8 @@ def merge_skips_obstructions(sbox):
   # No-op merge still sets mergeinfo
   expected_status.tweak('', status=' M')
   expected_skip = wc.State(wc_dir, {
-    'iota'   : Item(),
-    'A/D/G'  : Item(),
+    'iota'  : Item(verb='Skipped'),
+    'A/D/G' : Item(verb='Skipped'),
     })
   svntest.actions.run_and_verify_merge(wc_dir, '2', '3',
                                        sbox.repo_url, None,
@@ -1657,7 +1657,7 @@ def merge_skips_obstructions(sbox):
   expected_disk.remove('A/D/G')
   expected_disk.tweak('', props={SVN_PROP_MERGEINFO : '/:4'})
   expected_skip = wc.State(wc_dir, {
-    'A/B/lambda'  : Item(),
+    'A/B/lambda' : Item(verb='Skipped'),
     })
   # No-op merge still sets mergeinfo.
   expected_status_short = expected_status.copy(wc_dir)
@@ -1705,6 +1705,9 @@ def merge_skips_obstructions(sbox):
   expected_disk.remove('A/B/lambda')
   expected_status.tweak('A/B/lambda', status='! ')
   expected_status.tweak('', status='  ')
+  expected_skip = wc.State(wc_dir, {
+    'A/B/lambda' : Item(verb='Skipped missing target'),
+    })
   # Why do we need to --ignore-ancestry?  Because the previous merge of r4,
   # despite being inoperative, set mergeinfo for r4 on the WC.  With the
   # advent of merge tracking this repeat merge attempt would not be attempted.
@@ -1803,10 +1806,9 @@ def merge_into_missing(sbox):
     'Q/baz'    : Item(status='! ', wc_rev=3),
   })
   expected_skip = wc.State(F_path, {
-    'Q'   : Item(),
-    'foo' : Item(),
+    'Q'   : Item(verb='Skipped missing target'),
+    'foo' : Item(verb='Skipped missing target'),
     })
-
   # Use --ignore-ancestry because merge tracking aware merges raise an
   # error when the merge target is missing subtrees due to OS-level
   # deletes.
@@ -7822,8 +7824,8 @@ def merge_to_sparse_directories(sbox):
                               "prop:name" : "propval"}),
     })
   expected_skip = svntest.wc.State(immediates_dir, {
-    'D/H/omega'         : Item(),
-    'B/E/beta'          : Item(),
+    'D/H/omega' : Item(verb="Skipped"),
+    'B/E/beta'  : Item(verb="Skipped"),
     })
   svntest.actions.run_and_verify_merge(immediates_dir, '4', '9',
                                        sbox.repo_url + '/A', None,
@@ -7876,8 +7878,9 @@ def merge_to_sparse_directories(sbox):
                        props={SVN_PROP_MERGEINFO : '/A/mu:5-9'}),
     })
   expected_skip = svntest.wc.State(files_dir, {
-    'D/H/omega'       : Item(),
-    'B/E/beta'        : Item(),
+    'D'         : Item(verb="Skipped"),
+    'D/H/omega' : Item(verb="Skipped"),
+    'B/E/beta'  : Item(verb="Skipped"),
     })
   svntest.actions.run_and_verify_merge(files_dir, '4', '9',
                                        sbox.repo_url + '/A', None,
@@ -7919,9 +7922,10 @@ def merge_to_sparse_directories(sbox):
                               "prop:name" : "propval"}),
     })
   expected_skip = svntest.wc.State(empty_dir, {
-    'mu'               : Item(),
-    'D/H/omega'        : Item(),
-    'B/E/beta'         : Item(),
+    'mu'        : Item(verb="Skipped missing target"),
+    'D'         : Item(verb="Skipped"),
+    'D/H/omega' : Item(verb="Skipped"),
+    'B/E/beta'  : Item(verb="Skipped"),
     })
   svntest.actions.run_and_verify_merge(empty_dir, '4', '9',
                                        sbox.repo_url + '/A', None,
@@ -15408,9 +15412,10 @@ def skipped_files_get_correct_mergeinfo(
     'D/gamma'   : Item("This is the file 'gamma'.\n"),
     'D/H'       : Item(props={SVN_PROP_MERGEINFO : '/A/D/H:2*,3,4-8*'}),
     })
-  expected_skip = wc.State(A_COPY_path,
-                           {'D/H/psi'   : Item(),
-                            'D/H/omega' : Item()})
+  expected_skip = wc.State(
+    A_COPY_path,
+    {'D/H/psi'   : Item(verb='Skipped missing target'),
+     'D/H/omega' : Item(verb='Skipped missing target')})
   expected_output = wc.State(A_COPY_path,
                              {'B/E/beta'  : Item(status='U '),
                               'D/G/rho'   : Item(status='U ')})

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=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tree_conflict_tests.py Fri Jan  4 17:43:31
2013
@@ -765,7 +765,7 @@ def tree_conflicts_and_obstructions(sbox
     'beta'        : Item(status='  ', wc_rev=3),
     })
   expected_skip = wc.State(branch_path, {
-    'alpha-moved' : Item(),
+    'alpha-moved' : Item(verb='Skipped'),
     })
 
   svntest.actions.run_and_verify_merge(branch_path,
@@ -1313,16 +1313,16 @@ def tree_conflicts_merge_edit_onto_missi
     })
 
   expected_skip = svntest.wc.State('', {
-    'F/alpha'           : Item(),
+    'F/alpha'           : Item(verb='Skipped missing target'),
     # Obstruction handling improvements in 1.7 and 1.8 added
-    'DF/D1/beta'        : Item(),
-    'DDD/D1/D2/D3/zeta' : Item(),
-    'DDD/D1/D2/D3'      : Item(),
-    'DDF/D1/D2/gamma'   : Item(),
-    'D/D1/delta'        : Item(),
-    'D/D1'              : Item(),
-    'DD/D1/D2/epsilon'  : Item(),
-    'DD/D1/D2'          : Item(),
+    'DF/D1/beta'        : Item(verb='Skipped missing target'),
+    'DDD/D1/D2/D3/zeta' : Item(verb='Skipped'),
+    'DDD/D1/D2/D3'      : Item(verb='Skipped missing target'),
+    'DDF/D1/D2/gamma'   : Item(verb='Skipped missing target'),
+    'D/D1/delta'        : Item(verb='Skipped'),
+    'D/D1'              : Item(verb='Skipped missing target'),
+    'DD/D1/D2/epsilon'  : Item(verb='Skipped'),
+    'DD/D1/D2'          : Item(verb='Skipped missing target'),
     })
 
   # Currently this test fails because some parts of the merge
@@ -1385,14 +1385,14 @@ def tree_conflicts_merge_del_onto_missin
     })
 
   expected_skip = svntest.wc.State('', {
-    'F/alpha'           : Item(),
-    'D/D1'              : Item(),
+    'F/alpha'           : Item(verb='Skipped missing target'),
+    'D/D1'              : Item(verb='Skipped missing target'),
     # Obstruction handling improvements in 1.7 and 1.8 added
-    'D/D1'              : Item(),
-    'DD/D1/D2'          : Item(),
-    'DF/D1/beta'        : Item(),
-    'DDD/D1/D2/D3'      : Item(),
-    'DDF/D1/D2/gamma'   : Item(),
+    'D/D1'              : Item(verb='Skipped missing target'),
+    'DD/D1/D2'          : Item(verb='Skipped missing target'),
+    'DF/D1/beta'        : Item(verb='Skipped missing target'),
+    'DDD/D1/D2/D3'      : Item(verb='Skipped missing target'),
+    'DDF/D1/D2/gamma'   : Item(verb='Skipped missing target'),
     })
 
   svntest.actions.deep_trees_run_tests_scheme_for_merge(sbox,

Modified: subversion/trunk/subversion/tests/cmdline/patch_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/patch_tests.py?rev=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/patch_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/patch_tests.py Fri Jan  4 17:43:31 2013
@@ -278,7 +278,7 @@ def patch_absolute_paths(sbox):
   expected_status.tweak('A/B/E/alpha', status='M ')
 
   expected_skip = wc.State('', {
-    lambda_path:  Item(),
+    lambda_path:  Item(verb='Skipped missing target'),
   })
 
   svntest.actions.run_and_verify_patch('.', os.path.abspath(patch_file_path),
@@ -1012,9 +1012,11 @@ def patch_add_new_dir(sbox):
            'A/C'       : Item(status='D ', wc_rev=1),
   })
 
-  expected_skip = wc.State('', {A_Z_new_path : Item(),
-                                A_B_E_Y_new_path : Item(),
-                                A_C_new_path : Item()})
+  expected_skip = wc.State(
+    '',
+    {A_Z_new_path     : Item(verb='Skipped missing target'),
+     A_B_E_Y_new_path : Item(verb='Skipped missing target'),
+     A_C_new_path     : Item(verb='Skipped missing target')})
 
   svntest.actions.run_and_verify_patch(wc_dir,
                                        os.path.abspath(patch_file_path),
@@ -2452,7 +2454,7 @@ def patch_same_twice(sbox):
     '  Skipped paths: 1\n',
   ]
 
-  expected_skip = wc.State('', {beta_path : Item()})
+  expected_skip = wc.State('', {beta_path : Item(verb='Skipped')})
 
   # See above comment about the iota patch being applied twice.
   iota_contents += "Some more bytes\n"
@@ -3973,7 +3975,9 @@ def patch_delete_and_skip(sbox):
   expected_status.tweak('A/B/E/alpha', status='D ')
   expected_status.tweak('A/B/E/beta', status='D ')
 
-  expected_skip = wc.State('', {skipped_path: Item()})
+  expected_skip = wc.State(
+    '',
+    {skipped_path: Item(verb='Skipped missing target')})
 
   svntest.actions.run_and_verify_patch('.', os.path.abspath(patch_file_path),
                                        expected_output,

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=1428996&r1=1428995&r2=1428996&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Fri Jan  4 17:43:31 2013
@@ -94,7 +94,7 @@ _re_parse_status = re.compile('^([?!MACD
                               '((?P<wc_rev>\d+|-|\?) +(\d|-|\?)+ +(\S+) +)?'
                               '(?P<path>.+)$')
 
-_re_parse_skipped = re.compile("^Skipped[^']* '(.+)'( --.*)?\n")
+_re_parse_skipped = re.compile("^(Skipped[^']*) '(.+)'( --.*)?\n")
 
 _re_parse_summarize = re.compile("^([MAD ][M ])      (.+)\n")
 
@@ -444,7 +444,8 @@ class State:
 
       match = _re_parse_skipped.search(line)
       if match:
-        desc[to_relpath(match.group(1))] = StateItem()
+        desc[to_relpath(match.group(2))] =  StateItem(
+          verb=(match.group(1).strip(':')))
 
     return cls('', desc)
 



Mime
View raw message