subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1337394 - in /subversion/trunk/subversion: libsvn_client/commit_util.c tests/cmdline/lock_tests.py
Date Fri, 11 May 2012 22:06:20 GMT
Author: rhuijben
Date: Fri May 11 22:06:19 2012
New Revision: 1337394

URL: http://svn.apache.org/viewvc?rev=1337394&view=rev
Log:
Resolve an unmodified file unlock regression in the commit harvester.

* subversion/tests/cmdline/lock_tests.py
  (commit_file_unlock): Extend test to also try to unlock an unmodified file.

* subversion/libsvn_client/commit_util.c
  (harvest_status_callback): Handle unmodified but locked nodes when releasing
    locks.

Modified:
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/tests/cmdline/lock_tests.py

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1337394&r1=1337393&r2=1337394&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Fri May 11 22:06:19 2012
@@ -616,7 +616,8 @@ harvest_status_callback(void *status_bat
       case svn_wc_status_none:
         return SVN_NO_ERROR;
       case svn_wc_status_normal:
-        if (!copy_mode && !status->conflicted)
+        if (!copy_mode && !status->conflicted
+            && !(just_locked && status->lock))
           return SVN_NO_ERROR;
         break;
       default:

Modified: subversion/trunk/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/lock_tests.py?rev=1337394&r1=1337393&r2=1337394&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/lock_tests.py Fri May 11 22:06:19 2012
@@ -159,19 +159,21 @@ def commit_file_unlock(sbox):
   wc_dir = sbox.wc_dir
 
   fname = 'A/mu'
-  file_path = os.path.join(sbox.wc_dir, fname)
+  file_path = sbox.ospath(fname)
 
-  # lock fname as wc_author
+  # lock fname and iota as wc_author
   svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
-                                     '-m', 'some lock comment', file_path)
+                                     '-m', 'some lock comment',
+                                     sbox.ospath(fname),
+                                     sbox.ospath('iota'))
 
   # make a change and commit it, allowing lock to be released
   svntest.main.file_append(file_path, "Tweak!\n")
-  svntest.main.run_svn(None, 'commit', '-m', '',
-                       file_path)
+  svntest.main.run_svn(None, 'commit', '-m', '', wc_dir)
 
   expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_status.tweak(fname, wc_rev=2)
+  expected_status.tweak('iota', wc_rev=2)
 
   # Make sure the file is unlocked
   svntest.actions.run_and_verify_status(wc_dir, expected_status)



Mime
View raw message