subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1589573 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_ra_serf/update.c subversion/tests/cmdline/lock_tests.py
Date Thu, 24 Apr 2014 04:01:31 GMT
Author: svn-role
Date: Thu Apr 24 04:01:31 2014
New Revision: 1589573

URL: http://svn.apache.org/r1589573
Log:
Merge the 1.8.x-r1584342 branch:

 * r1581810, 1584342
   Fix issue 4412, locks lost from working copy with pre-1.6.17 servers.
   Justification:
     Regression from 1.7, makes using locks hard.
   Notes:
     r1584342 is the fix, r1581810 is a test that fails with a 1.6.16 server.
   Branch:
     ^/subversion/branches/1.8.x-r1584342
    (merge before ^/subversion/branches/1.8.x-r1584592)
   Votes:
     +1: philip, rhuijben, stefan2

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_ra_serf/update.c
    subversion/branches/1.8.x/subversion/tests/cmdline/lock_tests.py

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1581810,1584342
  Merged /subversion/branches/1.8.x-r1584342:r1584350-1589572

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1589573&r1=1589572&r2=1589573&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Thu Apr 24 04:01:31 2014
@@ -331,10 +331,3 @@ Approved changes:
    Votes:
      +1: rhuijben, philip, stefan2
 
- * r1573106, r1573209
-   A more stringent test for whether the compiler accepts a given option.
-   Justification:
-     Makes --enable-optimize and --enable-debug work with Solaris CC.
-   Votes:
-     +1: philip, rhuijben, stefan2
-

Modified: subversion/branches/1.8.x/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_ra_serf/update.c?rev=1589573&r1=1589572&r2=1589573&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_ra_serf/update.c Thu Apr 24 04:01:31 2014
@@ -329,9 +329,6 @@ struct report_context_t {
      files/dirs? */
   svn_boolean_t add_props_included;
 
-  /* Path -> lock token mapping. */
-  apr_hash_t *lock_path_tokens;
-
   /* Path -> const char *repos_relpath mapping */
   apr_hash_t *switched_paths;
 
@@ -2248,8 +2245,6 @@ end_report(svn_ra_serf__xml_parser_t *pa
                                         info->pool);
         }
 
-      info->lock_token = svn_hash_gets(ctx->lock_path_tokens, info->name);
-
       if (info->lock_token && !info->fetch_props)
         info->fetch_props = TRUE;
 
@@ -2578,13 +2573,6 @@ set_path(void *report_baton,
   SVN_ERR(svn_io_file_write_full(report->body_file, buf->data, buf->len,
                                  NULL, pool));
 
-  if (lock_token)
-    {
-      svn_hash_sets(report->lock_path_tokens,
-                    apr_pstrdup(report->pool, path),
-                    apr_pstrdup(report->pool, lock_token));
-    }
-
   return SVN_NO_ERROR;
 }
 
@@ -2660,12 +2648,6 @@ link_path(void *report_baton,
   if (!*path)
     report->root_is_switched = TRUE;
 
-  if (lock_token)
-    {
-      svn_hash_sets(report->lock_path_tokens,
-                    path, apr_pstrdup(report->pool, lock_token));
-    }
-
   return APR_SUCCESS;
 }
 
@@ -3193,7 +3175,6 @@ make_update_reporter(svn_ra_session_t *r
   report->ignore_ancestry = ignore_ancestry;
   report->send_copyfrom_args = send_copyfrom_args;
   report->text_deltas = text_deltas;
-  report->lock_path_tokens = apr_hash_make(report->pool);
   report->switched_paths = apr_hash_make(report->pool);
 
   report->source = src_path;

Modified: subversion/branches/1.8.x/subversion/tests/cmdline/lock_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/lock_tests.py?rev=1589573&r1=1589572&r2=1589573&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/lock_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/lock_tests.py Thu Apr 24 04:01:31 2014
@@ -1890,6 +1890,56 @@ def drop_locks_on_parent_deletion(sbox):
                                         wc_dir)
 	
 										
+def non_root_locks(sbox):
+  "locks for working copies not at repos root"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'cp', sbox.repo_url, sbox.repo_url + '/X',
+                                     '-m', 'copy greek tree')
+
+  sbox.simple_switch(sbox.repo_url + '/X')  
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Lock a file
+  svntest.actions.run_and_verify_svn(None, ".*locked by user", [],
+                                     'lock', sbox.ospath('A/D/G/pi'),
+                                     '-m', '')
+  expected_status.tweak('A/D/G/pi', writelocked='K')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Updates don't break the lock
+  sbox.simple_update('A/D')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  sbox.simple_update('')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Break the lock
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'unlock', sbox.repo_url + '/X/A/D/G/pi')
+
+  # Subdir update reports the break
+  sbox.simple_update('A/D')
+  expected_status.tweak('A/D/G/pi', writelocked=None)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # Relock and break
+  svntest.actions.run_and_verify_svn(None, ".*locked by user", [],
+                                     'lock', sbox.ospath('A/D/G/pi'),
+                                     '-m', '')
+  expected_status.tweak('A/D/G/pi', writelocked='K')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'unlock', sbox.repo_url + '/X/A/D/G/pi')
+
+  # Root update reports the break
+  sbox.simple_update('')
+  expected_status.tweak('A/D/G/pi', writelocked=None)
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
 ########################################################################
 # Run the tests
 
@@ -1943,6 +1993,7 @@ test_list = [ None,
               lock_unlock_deleted,
               commit_stolen_lock,
               drop_locks_on_parent_deletion,
+              non_root_locks,
             ]
 
 if __name__ == '__main__':



Mime
View raw message