subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r985219 - /subversion/trunk/subversion/tests/cmdline/revert_tests.py
Date Fri, 13 Aug 2010 14:49:58 GMT
Author: philip
Date: Fri Aug 13 14:49:58 2010
New Revision: 985219

URL: http://svn.apache.org/viewvc?rev=985219&view=rev
Log:
Add two tests of revert regressions from 1.6.

* subversion/tests/cmdline/revert_tests.py
  (revert_added_tree, revert_child_of_copy): New.
  (test_list): Mark new tests XFail.

Modified:
    subversion/trunk/subversion/tests/cmdline/revert_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/revert_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/revert_tests.py?rev=985219&r1=985218&r2=985219&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/revert_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/revert_tests.py Fri Aug 13 14:49:58 2010
@@ -989,6 +989,49 @@ def revert_add_over_not_present_dir(sbox
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 
+def revert_added_tree(sbox):
+  "revert an added tree fails"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'mkdir', sbox.ospath('X'), sbox.ospath('X/Y'))
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'X'   : Item(status='A ', wc_rev=0),
+    'X/Y' : Item(status='A ', wc_rev=0),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Revert is non-recursive and fails, status is unchanged
+  expected_error = '.*Try \'svn revert --depth infinity\'.*'
+  svntest.actions.run_and_verify_svn(None, None, expected_error,
+                                     'revert', sbox.ospath('X'))
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
+def revert_child_of_copy(sbox):
+  "revert a child of a copied directory does nothing"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'cp', sbox.ospath('A/B/E'), sbox.ospath('A/B/E2'))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/B/E2'       : Item(status='A ', copied='+', wc_rev='-'),
+    'A/B/E2/alpha' : Item(status='  ', copied='+', wc_rev='-'),
+    'A/B/E2/beta'  : Item(status='  ', copied='+', wc_rev='-'),
+    })
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Revert of child of copy does nothing, status is unchanged
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'revert', sbox.ospath('A/B/E2/beta'))
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
 ########################################################################
 # Run the tests
 
@@ -1016,6 +1059,8 @@ test_list = [ None,
               revert_replaced_with_history_file_2,
               revert_tree_conflicts_in_updated_files,
               revert_add_over_not_present_dir,
+              XFail(revert_added_tree),
+              XFail(revert_child_of_copy),
              ]
 
 if __name__ == '__main__':



Mime
View raw message