subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1516285 - /subversion/trunk/subversion/tests/cmdline/lock_tests.py
Date Wed, 21 Aug 2013 20:09:47 GMT
Author: philip
Date: Wed Aug 21 20:09:47 2013
New Revision: 1516285

URL: http://svn.apache.org/r1516285
Log:
Add a regression test for locks on copy source.

* subversion/tests/cmdline/lock_tests.py
  (copy_with_lock): New.
  (test_list): Add new test.

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

Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1516285&r1=1516284&r2=1516285&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Wed Aug 21 20:09:47 2013
@@ -1889,6 +1889,36 @@ def drop_locks_on_parent_deletion(sbox):
                                         None,
                                         wc_dir)
 	
+
+def copy_with_lock(sbox):
+  """copy with lock on source"""
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  lock_url = sbox.repo_url + '/A/B/E/alpha'
+
+  svntest.actions.run_and_validate_lock(lock_url, svntest.main.wc_author)
+  sbox.simple_copy('A/B/E', 'A/B/E2')
+
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/B/E2' : Item(verb='Adding'),
+    })
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/B/E/alpha', writelocked='O')
+  expected_status.add({
+    'A/B/E2'       : Item(status='  ', wc_rev=2),
+    'A/B/E2/alpha' : Item(status='  ', wc_rev=2),
+    'A/B/E2/beta'  : Item(status='  ', wc_rev=2),
+    })
+
+  # This is really a regression test for httpd: 2.2.25 and 2.4.6 have
+  # a bug that causes mod_dav to check for locks on the copy source
+  # and so the commit fails.
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None,
+                                        wc_dir)
 										
 ########################################################################
 # Run the tests
@@ -1943,6 +1973,7 @@ test_list = [ None,
               lock_unlock_deleted,
               commit_stolen_lock,
               drop_locks_on_parent_deletion,
+              copy_with_lock,
             ]
 
 if __name__ == '__main__':



Mime
View raw message