Author: stsp
Date: Mon Dec  8 15:13:29 2014
New Revision: 1643837

URL: http://svn.apache.org/r1643837
Log:
On the pin-externals branch: sync with trunk

Modified:
    subversion/branches/pin-externals/   (props changed)
    subversion/branches/pin-externals/autogen.sh
    subversion/branches/pin-externals/subversion/mod_dav_svn/reports/file-revs.c
    subversion/branches/pin-externals/subversion/mod_dav_svn/reports/get-locks.c
    subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c
    subversion/branches/pin-externals/subversion/mod_dav_svn/version.c
    subversion/branches/pin-externals/subversion/tests/cmdline/lock_tests.py
    subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/   (props 
changed)
    subversion/branches/pin-externals/tools/dev/unix-build/Makefile.svn

Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Dec  8 15:13:29 2014
@@ -84,3 +84,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
+/subversion/trunk:1643755-1643836

Modified: subversion/branches/pin-externals/autogen.sh
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/autogen.sh?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- subversion/branches/pin-externals/autogen.sh (original)
+++ subversion/branches/pin-externals/autogen.sh Mon Dec  8 15:13:29 2014
@@ -23,6 +23,10 @@
 ### Run this to produce everything needed for configuration. ###
 
 
+# Some shells can produce output when running 'cd' which interferes
+# with the construct 'abs=`cd dir && pwd`'.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
 # Run tests to ensure that our build requirements are met
 RELEASE_MODE=""
 RELEASE_ARGS=""

Modified: 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/file-revs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/mod_dav_svn/reports/file-revs.c?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/file-revs.c 
(original)
+++ 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/file-revs.c 
Mon Dec  8 15:13:29 2014
@@ -149,7 +149,7 @@ file_rev_handler(void *baton,
                  apr_pool_t *pool)
 {
   struct file_rev_baton *frb = baton;
-  apr_pool_t *subpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(pool);
   apr_hash_index_t *hi;
   int i;
 
@@ -169,11 +169,11 @@ file_rev_handler(void *baton,
       const char *pname;
       const svn_string_t *pval;
 
-      svn_pool_clear(subpool);
+      svn_pool_clear(iterpool);
       apr_hash_this(hi, &key, NULL, &val);
       pname = key;
       pval = val;
-      SVN_ERR(send_prop(frb, "rev-prop", pname, pval, subpool));
+      SVN_ERR(send_prop(frb, "rev-prop", pname, pval, iterpool));
     }
 
   /* Send file prop changes. */
@@ -181,17 +181,17 @@ file_rev_handler(void *baton,
     {
       const svn_prop_t *prop = &APR_ARRAY_IDX(props, i, svn_prop_t);
 
-      svn_pool_clear(subpool);
+      svn_pool_clear(iterpool);
       if (prop->value)
         SVN_ERR(send_prop(frb, "set-prop", prop->name, prop->value,
-                          subpool));
+                          iterpool));
       else
         {
           /* Property was removed. */
           SVN_ERR(dav_svn__brigade_printf(frb->bb, frb->output,
                                           "<S:remove-prop name=\"%s\"/>"
                                           DEBUG_CR,
-                                          apr_xml_quote_string(subpool,
+                                          apr_xml_quote_string(iterpool,
                                                                prop->name,
                                                                1)));
         }
@@ -223,7 +223,7 @@ file_rev_handler(void *baton,
     SVN_ERR(dav_svn__brigade_puts(frb->bb, frb->output,
                                   "</S:file-rev>" DEBUG_CR));
 
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }

Modified: 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/get-locks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/mod_dav_svn/reports/get-locks.c?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/get-locks.c 
(original)
+++ 
subversion/branches/pin-externals/subversion/mod_dav_svn/reports/get-locks.c 
Mon Dec  8 15:13:29 2014
@@ -66,7 +66,7 @@ send_get_lock_response(apr_hash_t *locks
                        apr_bucket_brigade *bb,
                        apr_pool_t *pool)
 {
-  apr_pool_t *subpool;
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
 
   /* start sending report */
@@ -76,15 +76,13 @@ send_get_lock_response(apr_hash_t *locks
                          "\" xmlns:D=\"DAV:\">" DEBUG_CR));
 
   /* stream the locks */
-  subpool = svn_pool_create(pool);
+  iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, locks); hi; hi = apr_hash_next(hi))
     {
-      void *val;
       const svn_lock_t *lock;
 
-      svn_pool_clear(subpool);
-      apr_hash_this(hi, NULL, NULL, &val);
-      lock = val;
+      svn_pool_clear(iterpool);
+      lock = apr_hash_this_val(hi);
 
       /* Begin the <S:lock> tag, transmitting the path, token, and
          creation date. */
@@ -93,10 +91,10 @@ send_get_lock_response(apr_hash_t *locks
                              "<S:path>%s</S:path>" DEBUG_CR
                              "<S:token>%s</S:token>" DEBUG_CR
                              "<S:creationdate>%s</S:creationdate>" DEBUG_CR,
-                             apr_xml_quote_string(subpool, lock->path, 1),
-                             apr_xml_quote_string(subpool, lock->token, 1),
+                             apr_xml_quote_string(iterpool, lock->path, 1),
+                             apr_xml_quote_string(iterpool, lock->token, 1),
                              svn_time_to_cstring(lock->creation_date,
-                                                 subpool)));
+                                                 iterpool)));
 
       /* Got expiration date?  Tell the client. */
       if (lock->expiration_date)
@@ -104,7 +102,7 @@ send_get_lock_response(apr_hash_t *locks
                                "<S:expirationdate>%s</S:expirationdate>"
                                DEBUG_CR,
                                svn_time_to_cstring(lock->expiration_date,
-                                                   subpool)));
+                                                   iterpool)));
 
       /* Transmit the lock ownership information. */
       if (lock->owner)
@@ -114,7 +112,7 @@ send_get_lock_response(apr_hash_t *locks
 
           if (svn_xml_is_xml_safe(lock->owner, strlen(lock->owner)))
             {
-              owner = apr_xml_quote_string(subpool, lock->owner, 1);
+              owner = apr_xml_quote_string(iterpool, lock->owner, 1);
             }
           else
             {
@@ -124,7 +122,7 @@ send_get_lock_response(apr_hash_t *locks
               owner_string.data = lock->owner;
               owner_string.len = strlen(lock->owner);
               encoded_owner = svn_base64_encode_string2(&owner_string, TRUE,
-                                                        subpool);
+                                                        iterpool);
               owner = encoded_owner->data;
               owner_base64 = TRUE;
             }
@@ -142,7 +140,7 @@ send_get_lock_response(apr_hash_t *locks
 
           if (svn_xml_is_xml_safe(lock->comment, strlen(lock->comment)))
             {
-              comment = apr_xml_quote_string(subpool, lock->comment, 1);
+              comment = apr_xml_quote_string(iterpool, lock->comment, 1);
             }
           else
             {
@@ -152,7 +150,7 @@ send_get_lock_response(apr_hash_t *locks
               comment_string.data = lock->comment;
               comment_string.len = strlen(lock->comment);
               encoded_comment = svn_base64_encode_string2(&comment_string,
-                                                          TRUE, subpool);
+                                                          TRUE, iterpool);
               comment = encoded_comment->data;
               comment_base64 = TRUE;
             }
@@ -165,7 +163,7 @@ send_get_lock_response(apr_hash_t *locks
       /* Okay, finish up this lock by closing the <S:lock> tag. */
       SVN_APR_ERR(ap_fprintf(output, bb, "</S:lock>" DEBUG_CR));
     }
-  svn_pool_destroy(subpool);
+  svn_pool_destroy(iterpool);
 
   /* Finish the report */
   SVN_APR_ERR(ap_fprintf(output, bb, "</S:get-locks-report>" DEBUG_CR));

Modified: subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/pin-externals/subversion/mod_dav_svn/repos.c Mon Dec  8 
15:13:29 2014
@@ -4184,9 +4184,16 @@ typedef struct walker_ctx_t {
 
 } walker_ctx_t;
 
-
+/* Recursively walk a resource for walk().  When DEPTH != 0, recurse with
+   DEPTH-1 on child nodes. WALK_ROOT should be TRUE for the root and will be
+   FALSE for any descendants, to avoid unneeded work for every descendant
+   node.
+   */
 static dav_error *
-do_walk(walker_ctx_t *ctx, int depth)
+do_walk(walker_ctx_t *ctx,
+        int depth,
+        svn_boolean_t walk_root,
+        apr_pool_t *scratch_pool)
 {
   const dav_walk_params *params = ctx->params;
   int isdir = ctx->res.collection;
@@ -4250,28 +4257,31 @@ do_walk(walker_ctx_t *ctx, int depth)
   uri_len = ctx->uri->len;
   repos_len = ctx->repos_path->len;
 
-  /* Tell our logging subsystem that we're listing a directory.
+  if (walk_root)
+    {
+      /* Tell our logging subsystem that we're listing a directory.
 
-     Note: if we cared, we could look at the 'User-Agent:' request
-     header and distinguish an svn client ('svn ls') from a generic
-     DAV client.  */
-  dav_svn__operational_log(&ctx->info,
-                           svn_log__get_dir(ctx->info.repos_path,
-                                            ctx->info.root.rev,
-                                            TRUE, FALSE, SVN_DIRENT_ALL,
-                                            params->pool));
+      Note: if we cared, we could look at the 'User-Agent:' request
+         header and distinguish an svn client ('svn ls') from a generic
+         DAV client.  */
+      dav_svn__operational_log(&ctx->info,
+                               svn_log__get_dir(ctx->info.repos_path,
+                                                ctx->info.root.rev,
+                                                TRUE, FALSE, SVN_DIRENT_ALL,
+                                                scratch_pool));
+    }
 
   /* fetch this collection's children */
   serr = svn_fs_dir_entries(&children, ctx->info.root.root,
-                            ctx->info.repos_path, params->pool);
+                            ctx->info.repos_path, scratch_pool);
   if (serr != NULL)
     return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
                                 "could not fetch collection members",
                                 params->pool);
 
   /* iterate over the children in this collection */
-  iterpool = svn_pool_create(params->pool);
-  for (hi = apr_hash_first(params->pool, children); hi; hi = apr_hash_next(hi))
+  iterpool = svn_pool_create(scratch_pool);
+  for (hi = apr_hash_first(scratch_pool, children); hi; hi = apr_hash_next(hi))
     {
       const void *key;
       apr_ssize_t klen;
@@ -4312,7 +4322,10 @@ do_walk(walker_ctx_t *ctx, int depth)
         {
           err = (*params->func)(&ctx->wres, DAV_CALLTYPE_MEMBER);
           if (err != NULL)
-            return err;
+            {
+              svn_pool_destroy(iterpool);
+              return err;
+            }
         }
       else
         {
@@ -4324,9 +4337,12 @@ do_walk(walker_ctx_t *ctx, int depth)
           ctx->res.uri = ctx->uri->data;
 
           /* recurse on this collection */
-          err = do_walk(ctx, depth - 1);
+          err = do_walk(ctx, depth - 1, FALSE, iterpool);
           if (err != NULL)
-            return err;
+            {
+              svn_pool_destroy(iterpool);
+              return err;
+            }
 
           /* restore the data */
           ctx->res.collection = FALSE;
@@ -4406,7 +4422,7 @@ walk(const dav_walk_params *params, int
   /* ### is the root already/always open? need to verify */
 
   /* always return the error, and any/all multistatus responses */
-  err = do_walk(&ctx, depth);
+  err = do_walk(&ctx, depth, TRUE, params->pool);
   *response = ctx.wres.response;
 
   return err;

Modified: subversion/branches/pin-externals/subversion/mod_dav_svn/version.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/mod_dav_svn/version.c?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/mod_dav_svn/version.c 
(original)
+++ subversion/branches/pin-externals/subversion/mod_dav_svn/version.c Mon Dec  
8 15:13:29 2014
@@ -1381,20 +1381,10 @@ release_locks(apr_hash_t *locks,
               request_rec *r,
               apr_pool_t *pool)
 {
-  apr_hash_index_t *hi;
   apr_pool_t *subpool = svn_pool_create(pool);
-  apr_hash_t *targets = apr_hash_make(subpool);
   svn_error_t *err;
 
-  for (hi = apr_hash_first(subpool, locks); hi; hi = apr_hash_next(hi))
-    {
-      const char *path = apr_hash_this_key(hi);
-      const char *token = apr_hash_this_val(hi);
-
-      svn_hash_sets(targets, path, token);
-    }
-
-  err = svn_repos_fs_unlock_many(repos, targets, FALSE, unlock_many_cb, r,
+  err = svn_repos_fs_unlock_many(repos, locks, FALSE, unlock_many_cb, r,
                                  subpool, subpool);
 
   if (err) /* If we got an error, just log it and move along. */

Modified: 
subversion/branches/pin-externals/subversion/tests/cmdline/lock_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/cmdline/lock_tests.py?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/cmdline/lock_tests.py 
(original)
+++ subversion/branches/pin-externals/subversion/tests/cmdline/lock_tests.py 
Mon Dec  8 15:13:29 2014
@@ -2355,6 +2355,26 @@ def lock_commit_bump(sbox):
   svntest.actions.run_and_verify_info(expected_infos, 
                                       sbox.ospath('iota'))
 
+def copy_dir_with_locked_file(sbox):
+  "copy a directory containing a locked file"
+
+  sbox.build()
+  AA_url = sbox.repo_url + '/AA'
+  AA2_url = sbox.repo_url + '/AA2'
+  A_url = sbox.repo_url + '/A'
+  mu_url = A_url + '/mu'
+
+  svntest.main.run_svn(None, 'lock', '-m', 'locked', mu_url)
+
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'cp', A_url, AA_url,
+                                     '-m', '')
+
+  expected_err = "svn: E160037: .*no matching lock-token available"
+  svntest.actions.run_and_verify_svn(None, None, expected_err,
+                                     'mv', A_url, AA2_url,
+                                     '-m', '')
+
 
 ########################################################################
 # Run the tests
@@ -2420,6 +2440,7 @@ test_list = [ None,
               dav_lock_refresh,
               delete_locked_file_with_percent,
               lock_commit_bump,
+              copy_dir_with_locked_file,
             ]
 
 if __name__ == '__main__':

Propchange: subversion/branches/pin-externals/subversion/tests/libsvn_fs_fs/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Dec  8 15:13:29 2014
@@ -4,8 +4,7 @@ Release
 test-repo-*
 upgrade_*
 fs-pack-test
-fs-fs-fuzzy-test
-fs-fs-pack-test
+fs-fs-*-test
 test-get-set-revprop-packed-fs
 get_set_multiple_huge_revprops_packed_fs
 *.o

Modified: subversion/branches/pin-externals/tools/dev/unix-build/Makefile.svn
URL: 
http://svn.apache.org/viewvc/subversion/branches/pin-externals/tools/dev/unix-build/Makefile.svn?rev=1643837&r1=1643836&r2=1643837&view=diff
==============================================================================
--- subversion/branches/pin-externals/tools/dev/unix-build/Makefile.svn 
(original)
+++ subversion/branches/pin-externals/tools/dev/unix-build/Makefile.svn Mon Dec 
 8 15:13:29 2014
@@ -1555,6 +1555,9 @@ endif
        echo >>[email protected] 'RedirectMatch permanent 
^/svn-test-work/repositories/REDIRECT-PERM-(.*)$$ 
/svn-test-work/repositories/$$1'
        echo >>[email protected] 'RedirectMatch 
^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$$ 
/svn-test-work/repositories/$$1'
        echo >>[email protected] 'Include "conf/$(SVN_REL_WC)*-custom.conf"'
+       echo >> [email protected] '#SVNInMemoryCacheSize 0'
+       echo >> [email protected] '#SVNCacheTextDeltas Off'
+       echo >> [email protected] '#SVNCacheRevProps Off'
        mv -f [email protected] $@
 
 .PHONY: libpath


Reply via email to