subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1565528 - in /subversion/trunk/subversion/tests/cmdline: basic_tests.py depth_tests.py merge_automatic_tests.py update_tests.py
Date Fri, 07 Feb 2014 03:55:44 GMT
Author: breser
Date: Fri Feb  7 03:55:44 2014
New Revision: 1565528

URL: http://svn.apache.org/r1565528
Log:
Followup to r1565388, fix the tests I broke.

* subversion/tests/cmdline/basic_tests.py
  (basic_update): account for the error received when all targets aren't
    immediate children of a versioned path and add a test when there is
    a valid target, which doesn't generate an error.

* subversion/tests/cmdline/depth_tests.py
  (depth_immediates_bring_in_file): trying to bring in a node that is
    not an immediate child of a versioned path generates an error now.
    Remove a duplicate calculateion of the expected_status.

* subversion/tests/cmdline/merge_automatic_tests.py
  (cherry_pick): don't call sbox.simple_update() with the target that
    will be a relative path to the CWD as opposed to relative to the
    sandbox as simple_update() expects.
  (cherry1_fwd): Call sbox.simple_update() before cherry picking.

* subversion/tests/cmdline/update_tests.py
  (update_child_below_add): trying to update a node that is not a immediate
    child of a versioned path generates an error, but that is an immediate
    child does not both show as skipped.

Modified:
    subversion/trunk/subversion/tests/cmdline/basic_tests.py
    subversion/trunk/subversion/tests/cmdline/depth_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1565528&r1=1565527&r2=1565528&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Fri Feb  7 03:55:44 2014
@@ -204,17 +204,33 @@ def basic_update(sbox):
                                         expected_status)
 
   # Unversioned paths, those that are not immediate children of a versioned
-  # path, are skipped and do not raise an error
+  # path, are skipped and do raise an error if they are the only targets
   xx_path = sbox.ospath('xx/xx')
-  exit_code, out, err = svntest.actions.run_and_verify_svn(
+  expected_err = "svn: E155007: "
+  svntest.actions.run_and_verify_svn(
     "update xx/xx",
-    ["Skipped '"+xx_path+"'\n",
-    ] + svntest.main.summary_of_conflicts(skipped_paths=1),
-    [], 'update', xx_path)
-  exit_code, out, err = svntest.actions.run_and_verify_svn(
-    "update xx/xx", [], [],
+    ["Skipped '"+xx_path+"'\n", ],
+    expected_err,
+    'update', xx_path)
+  svntest.actions.run_and_verify_svn(
+    "update xx/xx", [], expected_err,
     'update', '--quiet', xx_path)
 
+  # Unversioned paths, that are not the only targets of the command are
+  # skipped without an error
+  svntest.actions.run_and_verify_svn(
+    "update A/mu xx/xx",
+    ["Updating '"+mu_path+"':\n",
+     "At revision 2.\n",
+     "Skipped '"+xx_path+"'\n",
+     "Summary of updates:\n",
+     "  Updated '"+mu_path+"' to r2.\n"
+    ] + svntest.main.summary_of_conflicts(skipped_paths=1),
+    [], 'update', mu_path, xx_path)
+  svntest.actions.run_and_verify_svn(
+    "update A/mu xx/xx",
+    [], [], 'update', '--quiet', mu_path, xx_path)
+
 #----------------------------------------------------------------------
 def basic_mkdir_url(sbox):
   "basic mkdir URL"

Modified: subversion/trunk/subversion/tests/cmdline/depth_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/depth_tests.py?rev=1565528&r1=1565527&r2=1565528&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/depth_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/depth_tests.py Fri Feb  7 03:55:44 2014
@@ -504,26 +504,10 @@ def depth_immediates_bring_in_file(sbox)
                                         A_mu_path)
 
   # Run 'svn up A/D/gamma' to test the edge case 'Skipped'.
-  expected_output = svntest.wc.State(wc_imm, {
-    'A/D/gamma'   : Item(verb='Skipped'),
-    })
-  expected_disk = svntest.main.greek_state.copy()
-  expected_disk.remove('A/C', 'A/B/lambda', 'A/B/E', 'A/B/E/alpha',
-                       'A/B/E/beta', 'A/B/F', 'A/B', 'A/D/gamma', 'A/D/G',
-                       'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', 'A/D/H/chi',
-                       'A/D/H/psi', 'A/D/H/omega', 'A/D/H', 'A/D')
-  expected_status = svntest.actions.get_virginal_state(wc_imm, 1)
-  expected_status.remove('A/C', 'A/B/lambda', 'A/B/E', 'A/B/E/alpha',
-                       'A/B/E/beta', 'A/B/F', 'A/B', 'A/D/gamma', 'A/D/G',
-                       'A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', 'A/D/H/chi',
-                       'A/D/H/psi', 'A/D/H/omega', 'A/D/H', 'A/D')
-  svntest.actions.run_and_verify_update(wc_imm,
-                                        expected_output,
-                                        expected_disk,
-                                        expected_status,
-                                        None, None, None,
-                                        None, None, None,
-                                        gamma_path)
+  svntest.actions.run_and_verify_svn("update A/D/gamma",
+                       ["Skipped '"+gamma_path+"'\n", ],
+                       "svn: E155007: ", 'update', gamma_path)
+  svntest.actions.run_and_verify_status(wc_imm, expected_status)
 
 #----------------------------------------------------------------------
 def depth_immediates_fill_in_dir(sbox):

Modified: subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py?rev=1565528&r1=1565527&r2=1565528&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_automatic_tests.py Fri Feb  7 03:55:44
2014
@@ -334,7 +334,6 @@ def three_way_merge_no_op(base_node, sou
 def cherry_pick(sbox, rev, source, target):
   """Cherry-pick merge revision REV from branch SOURCE to branch TARGET
   (both WC-relative paths), and commit."""
-  sbox.simple_update(target)
   svn_merge(rev, source, target)
   sbox.simple_commit()
 
@@ -691,6 +690,7 @@ def cherry1_fwd(sbox):
   #     2  34  5  67  8  9  0  1
 
   init_mod_merge_mod(sbox, mod_6=True, mod_7=False)
+  sbox.simple_update()
   modify_branch(sbox, 'A', 8)
   cherry_pick(sbox, 8, 'A', 'B')
   modify_branch(sbox, 'A', 10)

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1565528&r1=1565527&r2=1565528&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Fri Feb  7 03:55:44 2014
@@ -6763,21 +6763,20 @@ def update_child_below_add(sbox):
   wc_dir = sbox.wc_dir
 
   sbox.simple_update('A/B', 0)
+  e_path = sbox.ospath('A/B/E')
 
-  # Update skips A/B/E because A/B has a not-present BASE node.
-  expected_output = svntest.wc.State(wc_dir, {
-      'A/B/E' : Item(verb='Skipped'),
-  })
+  # Update skips and errors on A/B/E because A/B has a not-present BASE node.
+  expected_output = ["Skipped '"+e_path+"'\n"]
+  expected_err = "svn: E155007: "
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.remove('A/B', 'A/B/E', 'A/B/E/alpha', 'A/B/E/beta',
                          'A/B/F', 'A/B/lambda')
-  svntest.actions.run_and_verify_update(wc_dir,
-                                        expected_output,
-                                        None,
-                                        expected_status,
-                                        None, None, None,
-                                        None, None, None,
-                                        sbox.ospath('A/B/E'))
+  svntest.actions.run_and_verify_svn("update A/B/E",
+                                     expected_output,
+                                     expected_err,
+                                     'update', e_path)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 
   # Add working nodes over A/B
   sbox.simple_mkdir('A/B')
@@ -6789,6 +6788,9 @@ def update_child_below_add(sbox):
       'A/B/E'       : Item(status='A ', wc_rev='-'),
       'A/B/E/alpha' : Item(status='A ', wc_rev='-'),
   })
+  expected_output = svntest.wc.State(wc_dir, {
+      'A/B/E' : Item(verb='Skipped'),
+  })
   # Update should still skip A/B/E
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output,



Mime
View raw message