You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <be...@qqmail.nl> on 2014/03/14 21:49:16 UTC

RE: svn commit: r1577685 -/subversion/trunk/subversion/tests/cmdline/lock_tests.py

I'm not sure if we can really fix this as a bug... That update could just be to some revision in which the node does not exist... (And the Url might still exist in a different location of the working copy via a switch)

And the update editor drive can't report the lock as broken on a deleted node (as that would require describing a prop change on something that doesn't exist).

The update after that final commit will remove the propchange though.

I can't really think of a simple, cheap way to fix this without causing a different bug.

Bert

-----Original Message-----
From: "philip@apache.org" <ph...@apache.org>
Sent: ‎14-‎3-‎2014 21:01
To: "commits@subversion.apache.org" <co...@subversion.apache.org>
Subject: svn commit: r1577685 -/subversion/trunk/subversion/tests/cmdline/lock_tests.py

Author: philip
Date: Fri Mar 14 20:01:18 2014
New Revision: 1577685

URL: http://svn.apache.org/r1577685
Log:
Add an XFAIL regression test for a minor lock problem reported by a user.

* subversion/tests/cmdline/lock_tests.py
  (break_delete_add): New XFAIL test.
  (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=1577685&r1=1577684&r2=1577685&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Fri Mar 14 20:01:18 2014
@@ -1988,6 +1988,46 @@ def failing_post_hooks(sbox):
                                       'unlock', pi_path)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
+@XFail()
+def break_delete_add(sbox):
+  "break a lock, delete and add the file"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svn(None, ".*locked by user", [],
+                                     'lock',
+                                     '-m', 'some lock comment',
+                                     sbox.ospath('A/mu'))
+
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/mu', writelocked='K')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  svntest.actions.run_and_verify_svn(None, ".*unlocked", [],
+                                     'unlock', '--force',
+                                     sbox.repo_url + '/A/mu')
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'rm',
+                                     '-m', 'delete file',
+                                     sbox.repo_url + '/A/mu')
+
+  # Update removes the locked file and should remove the lock token.
+  sbox.simple_update()
+
+  # Lock token not visible on newly added file.
+  sbox.simple_append('A/mu', 'another mu')
+  sbox.simple_add('A/mu')
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.tweak('A/mu', status='A ', wc_rev='-')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  ### XFAIL Broken lock token now visible in status.
+  sbox.simple_commit()
+  expected_status.tweak('A/mu', status='  ', wc_rev=3)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 ########################################################################
 # Run the tests
 
@@ -2044,6 +2084,7 @@ test_list = [ None,
               copy_with_lock,
               lock_hook_messages,
               failing_post_hooks,
+              break_delete_add,
             ]
 
 if __name__ == '__main__':