subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1481041 [8/38] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/svncopy/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/server-side/fsfsfi...
Date Fri, 10 May 2013 14:58:56 GMT
Modified: subversion/branches/master-passphrase/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/copy.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/copy.c Fri May 10 14:58:47 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include <string.h>
+#include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_error_codes.h"
@@ -179,7 +180,8 @@ get_copy_pair_ancestors(const apr_array_
 
 /* The guts of do_wc_to_wc_copies */
 static svn_error_t *
-do_wc_to_wc_copies_with_write_lock(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_copies_with_write_lock(svn_boolean_t *timestamp_sleep,
+                                   const apr_array_header_t *copy_pairs,
                                    const char *dst_parent,
                                    svn_client_ctx_t *ctx,
                                    apr_pool_t *scratch_pool)
@@ -202,6 +204,7 @@ do_wc_to_wc_copies_with_write_lock(const
       /* Perform the copy */
       dst_abspath = svn_dirent_join(pair->dst_parent_abspath, pair->base_name,
                                     iterpool);
+      *timestamp_sleep = TRUE;
       err = svn_wc_copy3(ctx->wc_ctx, pair->src_abspath_or_url, dst_abspath,
                          FALSE /* metadata_only */,
                          ctx->cancel_func, ctx->cancel_baton,
@@ -211,7 +214,6 @@ do_wc_to_wc_copies_with_write_lock(const
     }
   svn_pool_destroy(iterpool);
 
-  svn_io_sleep_for_timestamps(dst_parent, scratch_pool);
   SVN_ERR(err);
   return SVN_NO_ERROR;
 }
@@ -219,7 +221,8 @@ do_wc_to_wc_copies_with_write_lock(const
 /* Copy each COPY_PAIR->SRC into COPY_PAIR->DST.  Use POOL for temporary
    allocations. */
 static svn_error_t *
-do_wc_to_wc_copies(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_copies(svn_boolean_t *timestamp_sleep,
+                   const apr_array_header_t *copy_pairs,
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
@@ -232,7 +235,8 @@ do_wc_to_wc_copies(const apr_array_heade
   SVN_ERR(svn_dirent_get_absolute(&dst_parent_abspath, dst_parent, pool));
 
   SVN_WC__CALL_WITH_WRITE_LOCK(
-    do_wc_to_wc_copies_with_write_lock(copy_pairs, dst_parent, ctx, pool),
+    do_wc_to_wc_copies_with_write_lock(timestamp_sleep, copy_pairs, dst_parent,
+                                       ctx, pool),
     ctx->wc_ctx, dst_parent_abspath, FALSE, pool);
 
   return SVN_NO_ERROR;
@@ -294,7 +298,8 @@ do_wc_to_wc_moves_with_locks1(svn_client
 /* Move each COPY_PAIR->SRC into COPY_PAIR->DST, deleting COPY_PAIR->SRC
    afterwards.  Use POOL for temporary allocations. */
 static svn_error_t *
-do_wc_to_wc_moves(const apr_array_header_t *copy_pairs,
+do_wc_to_wc_moves(svn_boolean_t *timestamp_sleep,
+                  const apr_array_header_t *copy_pairs,
                   const char *dst_path,
                   svn_boolean_t allow_mixed_revisions,
                   svn_boolean_t metadata_only,
@@ -348,6 +353,8 @@ do_wc_to_wc_moves(const apr_array_header
           lock_dst = TRUE;
         }
 
+      *timestamp_sleep = TRUE;
+
       /* Perform the copy and then the delete. */
       if (lock_src)
         SVN_WC__CALL_WITH_WRITE_LOCK(
@@ -368,8 +375,6 @@ do_wc_to_wc_moves(const apr_array_header
     }
   svn_pool_destroy(iterpool);
 
-  svn_io_sleep_for_timestamps(dst_path, pool);
-
   return svn_error_trace(err);
 }
 
@@ -599,9 +604,7 @@ path_driver_cb_func(void **dir_baton,
 {
   struct path_driver_cb_baton *cb_baton = callback_baton;
   svn_boolean_t do_delete = FALSE, do_add = FALSE;
-  path_driver_info_t *path_info = apr_hash_get(cb_baton->action_hash,
-                                               path,
-                                               APR_HASH_KEY_STRING);
+  path_driver_info_t *path_info = svn_hash_gets(cb_baton->action_hash, path);
 
   /* Initialize return value. */
   *dir_baton = NULL;
@@ -1045,9 +1048,9 @@ repos_to_repos_copy(const apr_array_head
       info->src_path = src_rel;
       info->dst_path = dst_rel;
 
-      apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING, info);
+      svn_hash_sets(action_hash, info->dst_path, info);
       if (is_move && (! info->resurrection))
-        apr_hash_set(action_hash, info->src_path, APR_HASH_KEY_STRING, info);
+        svn_hash_sets(action_hash, info->src_path, info);
     }
 
   if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
@@ -1115,7 +1118,7 @@ repos_to_repos_copy(const apr_array_head
           info->dir_add = TRUE;
 
           APR_ARRAY_PUSH(paths, const char *) = relpath;
-          apr_hash_set(action_hash, relpath, APR_HASH_KEY_STRING, info);
+          svn_hash_sets(action_hash, relpath, info);
         }
     }
 
@@ -1361,9 +1364,8 @@ wc_to_repos_copy(const apr_array_header_
                                             ctx, scratch_pool, iterpool));
 
   /* The committables are keyed by the repository root */
-  commit_items = apr_hash_get(committables->by_repository,
-                              cukb.repos_root_url,
-                              APR_HASH_KEY_STRING);
+  commit_items = svn_hash_gets(committables->by_repository,
+                               cukb.repos_root_url);
   SVN_ERR_ASSERT(commit_items != NULL);
 
   if (cukb.should_reparent)
@@ -1467,7 +1469,7 @@ wc_to_repos_copy(const apr_array_header_
                                           ctx->wc_ctx, item->path, FALSE,
                                           scratch_pool, iterpool));
           if (relpath)
-            apr_hash_set(relpath_map, relpath, APR_HASH_KEY_STRING, item->path);
+            svn_hash_sets(relpath_map, relpath, item->path);
         }
     }
 #endif
@@ -1542,7 +1544,8 @@ notification_adjust_func(void *baton,
 
    Resolve PAIR->src_revnum to a real revision number if it isn't already. */
 static svn_error_t *
-repos_to_wc_copy_single(svn_client__copy_pair_t *pair,
+repos_to_wc_copy_single(svn_boolean_t *timestamp_sleep,
+                        svn_client__copy_pair_t *pair,
                         svn_boolean_t same_repositories,
                         svn_boolean_t ignore_externals,
                         svn_ra_session_t *ra_session,
@@ -1579,7 +1582,7 @@ repos_to_wc_copy_single(svn_client__copy
           /* Find a temporary location in which to check out the copy source. */
           SVN_ERR(svn_wc__get_tmpdir(&tmpdir_abspath, ctx->wc_ctx, dst_abspath,
                                      pool, pool));
-                                     
+
           SVN_ERR(svn_io_open_unique_file3(NULL, &tmp_abspath, tmpdir_abspath,
                                            svn_io_file_del_on_close, pool, pool));
 
@@ -1594,14 +1597,14 @@ repos_to_wc_copy_single(svn_client__copy
             void *old_notify_baton2 = ctx->notify_baton2;
             struct notification_adjust_baton nb;
             svn_error_t *err;
-          
+
             nb.inner_func = ctx->notify_func2;
             nb.inner_baton = ctx->notify_baton2;
             nb.checkout_abspath = tmp_abspath;
             nb.final_abspath = dst_abspath;
             ctx->notify_func2 = notification_adjust_func;
             ctx->notify_baton2 = &nb;
-          
+
             err = svn_client__checkout_internal(&pair->src_revnum,
                                                 pair->src_original,
                                                 tmp_abspath,
@@ -1610,13 +1613,15 @@ repos_to_wc_copy_single(svn_client__copy
                                                 svn_depth_infinity,
                                                 ignore_externals, FALSE,
                                                 &sleep_needed, ctx, pool);
-          
+
             ctx->notify_func2 = old_notify_func2;
             ctx->notify_baton2 = old_notify_baton2;
 
             SVN_ERR(err);
           }
 
+          *timestamp_sleep = TRUE;
+
       /* Schedule dst_path for addition in parent, with copy history.
          Don't send any notification here.
          Then remove the temporary checkout's .svn dir in preparation for
@@ -1639,6 +1644,8 @@ repos_to_wc_copy_single(svn_client__copy
         }
       else
         {
+          *timestamp_sleep = TRUE;
+
           SVN_ERR(svn_client__copy_foreign(pair->src_abspath_or_url,
                                            dst_abspath,
                                            &pair->src_peg_revision,
@@ -1668,7 +1675,9 @@ repos_to_wc_copy_single(svn_client__copy
                               &pair->src_revnum, &new_props, pool));
 
       if (new_props && ! same_repositories)
-        apr_hash_set(new_props, SVN_PROP_MERGEINFO, APR_HASH_KEY_STRING, NULL);
+        svn_hash_sets(new_props, SVN_PROP_MERGEINFO, NULL);
+
+      *timestamp_sleep = TRUE;
 
       SVN_ERR(svn_wc_add_repos_file4(
          ctx->wc_ctx, dst_abspath,
@@ -1699,13 +1708,12 @@ repos_to_wc_copy_single(svn_client__copy
       (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
     }
 
-  svn_io_sleep_for_timestamps(dst_abspath, pool);
-
   return SVN_NO_ERROR;
 }
 
-static svn_error_t*
-repos_to_wc_copy_locked(const apr_array_header_t *copy_pairs,
+static svn_error_t *
+repos_to_wc_copy_locked(svn_boolean_t *timestamp_sleep,
+                        const apr_array_header_t *copy_pairs,
                         const char *top_dst_path,
                         svn_boolean_t ignore_externals,
                         svn_ra_session_t *ra_session,
@@ -1768,7 +1776,8 @@ repos_to_wc_copy_locked(const apr_array_
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(repos_to_wc_copy_single(APR_ARRAY_IDX(copy_pairs, i,
+      SVN_ERR(repos_to_wc_copy_single(timestamp_sleep,
+                                      APR_ARRAY_IDX(copy_pairs, i,
                                                     svn_client__copy_pair_t *),
                                       same_repositories,
                                       ignore_externals,
@@ -1780,7 +1789,8 @@ repos_to_wc_copy_locked(const apr_array_
 }
 
 static svn_error_t *
-repos_to_wc_copy(const apr_array_header_t *copy_pairs,
+repos_to_wc_copy(svn_boolean_t *timestamp_sleep,
+                 const apr_array_header_t *copy_pairs,
                  svn_boolean_t make_parents,
                  svn_boolean_t ignore_externals,
                  svn_client_ctx_t *ctx,
@@ -1889,7 +1899,8 @@ repos_to_wc_copy(const apr_array_header_
   svn_pool_destroy(iterpool);
 
   SVN_WC__CALL_WITH_WRITE_LOCK(
-    repos_to_wc_copy_locked(copy_pairs, top_dst_path, ignore_externals,
+    repos_to_wc_copy_locked(timestamp_sleep,
+                            copy_pairs, top_dst_path, ignore_externals,
                             ra_session, ctx, pool),
     ctx->wc_ctx, lock_abspath, FALSE, pool);
   return SVN_NO_ERROR;
@@ -1899,9 +1910,17 @@ repos_to_wc_copy(const apr_array_header_
         ((revision.kind != svn_opt_revision_unspecified) \
           && (revision.kind != svn_opt_revision_working))
 
-/* Perform all allocations in POOL. */
+/* ...
+ *
+ * Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
+ * change *TIMESTAMP_SLEEP.  This output will be valid even if the
+ * function returns an error.
+ *
+ * Perform all allocations in POOL.
+ */
 static svn_error_t *
-try_copy(const apr_array_header_t *sources,
+try_copy(svn_boolean_t *timestamp_sleep,
+         const apr_array_header_t *sources,
          const char *dst_path_in,
          svn_boolean_t is_move,
          svn_boolean_t allow_mixed_revisions,
@@ -2195,7 +2214,8 @@ try_copy(const apr_array_header_t *sourc
 
       /* Copy or move all targets. */
       if (is_move)
-        return svn_error_trace(do_wc_to_wc_moves(copy_pairs, dst_path_in,
+        return svn_error_trace(do_wc_to_wc_moves(timestamp_sleep,
+                                                 copy_pairs, dst_path_in,
                                                  allow_mixed_revisions,
                                                  metadata_only,
                                                  ctx, pool));
@@ -2203,7 +2223,8 @@ try_copy(const apr_array_header_t *sourc
         {
           /* We ignore these values, so assert the default value */
           SVN_ERR_ASSERT(allow_mixed_revisions && !metadata_only);
-          return svn_error_trace(do_wc_to_wc_copies(copy_pairs, ctx, pool));
+          return svn_error_trace(do_wc_to_wc_copies(timestamp_sleep,
+                                                    copy_pairs, ctx, pool));
         }
     }
   else if ((! srcs_are_urls) && (dst_is_url))
@@ -2215,7 +2236,8 @@ try_copy(const apr_array_header_t *sourc
   else if ((srcs_are_urls) && (! dst_is_url))
     {
       return svn_error_trace(
-        repos_to_wc_copy(copy_pairs, make_parents, ignore_externals,
+        repos_to_wc_copy(timestamp_sleep,
+                         copy_pairs, make_parents, ignore_externals,
                          ctx, pool));
     }
   else
@@ -2243,13 +2265,15 @@ svn_client_copy6(const apr_array_header_
                  apr_pool_t *pool)
 {
   svn_error_t *err;
+  svn_boolean_t timestamp_sleep = FALSE;
   apr_pool_t *subpool = svn_pool_create(pool);
 
   if (sources->nelts > 1 && !copy_as_child)
     return svn_error_create(SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED,
                             NULL, NULL);
 
-  err = try_copy(sources, dst_path,
+  err = try_copy(&timestamp_sleep,
+                 sources, dst_path,
                  FALSE /* is_move */,
                  TRUE /* allow_mixed_revisions */,
                  FALSE /* metadata_only */,
@@ -2277,12 +2301,13 @@ svn_client_copy6(const apr_array_header_
 
       src_basename = src_is_url ? svn_uri_basename(src_path, subpool)
                                 : svn_dirent_basename(src_path, subpool);
+      dst_path
+        = dst_is_url ? svn_path_url_add_component2(dst_path, src_basename,
+                                                   subpool)
+                     : svn_dirent_join(dst_path, src_basename, subpool);
 
-      err = try_copy(sources,
-                     dst_is_url
-                         ? svn_path_url_add_component2(dst_path, src_basename,
-                                                       subpool)
-                         : svn_dirent_join(dst_path, src_basename, subpool),
+      err = try_copy(&timestamp_sleep,
+                     sources, dst_path,
                      FALSE /* is_move */,
                      TRUE /* allow_mixed_revisions */,
                      FALSE /* metadata_only */,
@@ -2294,6 +2319,10 @@ svn_client_copy6(const apr_array_header_
                      subpool);
     }
 
+  /* Sleep if required.  DST_PATH is not a URL in these cases. */
+  if (timestamp_sleep)
+    svn_io_sleep_for_timestamps(dst_path, subpool);
+
   svn_pool_destroy(subpool);
   return svn_error_trace(err);
 }
@@ -2315,6 +2344,7 @@ svn_client_move7(const apr_array_header_
   const svn_opt_revision_t head_revision
     = { svn_opt_revision_head, { 0 } };
   svn_error_t *err;
+  svn_boolean_t timestamp_sleep = FALSE;
   int i;
   apr_pool_t *subpool = svn_pool_create(pool);
   apr_array_header_t *sources = apr_array_make(pool, src_paths->nelts,
@@ -2337,7 +2367,8 @@ svn_client_move7(const apr_array_header_
       APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = copy_source;
     }
 
-  err = try_copy(sources, dst_path,
+  err = try_copy(&timestamp_sleep,
+                 sources, dst_path,
                  TRUE /* is_move */,
                  allow_mixed_revisions,
                  metadata_only,
@@ -2364,12 +2395,13 @@ svn_client_move7(const apr_array_header_
 
       src_basename = src_is_url ? svn_uri_basename(src_path, pool)
                                 : svn_dirent_basename(src_path, pool);
+      dst_path
+        = dst_is_url ? svn_path_url_add_component2(dst_path, src_basename,
+                                                   subpool)
+                     : svn_dirent_join(dst_path, src_basename, subpool);
 
-      err = try_copy(sources,
-                     dst_is_url
-                         ? svn_path_url_add_component2(dst_path,
-                                                       src_basename, pool)
-                         : svn_dirent_join(dst_path, src_basename, pool),
+      err = try_copy(&timestamp_sleep,
+                     sources, dst_path,
                      TRUE /* is_move */,
                      allow_mixed_revisions,
                      metadata_only,
@@ -2381,6 +2413,10 @@ svn_client_move7(const apr_array_header_
                      subpool);
     }
 
+  /* Sleep if required.  DST_PATH is not a URL in these cases. */
+  if (timestamp_sleep)
+    svn_io_sleep_for_timestamps(dst_path, subpool);
+
   svn_pool_destroy(subpool);
   return svn_error_trace(err);
 }

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/copy_foreign.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/copy_foreign.c Fri May 10 14:58:47 2013
@@ -22,10 +22,11 @@
  */
 
 /* ==================================================================== */
- 
+
 /*** Includes. ***/
 
 #include <string.h>
+#include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_delta.h"
 #include "svn_dirent_uri.h"
@@ -164,9 +165,8 @@ dir_change_prop(void *dir_baton,
         db->properties = apr_hash_make(db->pool);
 
       if (value != NULL)
-        apr_hash_set(db->properties,
-                     apr_pstrdup(db->pool, name), APR_HASH_KEY_STRING,
-                     svn_string_dup(value, db->pool));
+        svn_hash_sets(db->properties, apr_pstrdup(db->pool, name),
+                      svn_string_dup(value, db->pool));
     }
   else
     {
@@ -311,9 +311,8 @@ file_change_prop(void *file_baton,
     fb->properties = apr_hash_make(fb->pool);
 
   if (value != NULL)
-    apr_hash_set(fb->properties,
-                 apr_pstrdup(fb->pool, name), APR_HASH_KEY_STRING,
-                 svn_string_dup(value, fb->pool));
+    svn_hash_sets(fb->properties, apr_pstrdup(fb->pool, name),
+                  svn_string_dup(value, fb->pool));
 
   return SVN_NO_ERROR;
 }
@@ -429,10 +428,10 @@ copy_foreign_dir(svn_ra_session_t *ra_se
                                             &wrapped_editor, &wrapped_baton,
                                             scratch_pool));
 
-  SVN_ERR(svn_ra_do_update2(ra_session, &reporter, &reporter_baton,
+  SVN_ERR(svn_ra_do_update3(ra_session, &reporter, &reporter_baton,
                             location->rev, "", svn_depth_infinity,
-                            FALSE, wrapped_editor, wrapped_baton,
-                            scratch_pool));
+                            FALSE, FALSE, wrapped_editor, wrapped_baton,
+                            scratch_pool, scratch_pool));
 
   SVN_ERR(reporter->set_path(reporter_baton, "", location->rev, depth,
                              TRUE /* incomplete */,
@@ -533,7 +532,7 @@ svn_client__copy_foreign(const char *url
                 || ! strcmp(name, SVN_PROP_MERGEINFO))
               {
                 /* We can't handle DAV, ENTRY and merge specific props here */
-                apr_hash_set(props, name, APR_HASH_KEY_STRING, NULL);
+                svn_hash_sets(props, name, NULL);
               }
           }
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/ctx.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/ctx.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/ctx.c Fri May 10 14:58:47 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include <apr_pools.h>
+#include "svn_hash.h"
 #include "svn_client.h"
 #include "svn_error.h"
 
@@ -81,7 +82,7 @@ svn_client_create_context2(svn_client_ct
                            apr_pool_t *pool)
 {
   svn_config_t *cfg_config;
-                                   
+
   *ctx = apr_pcalloc(pool, sizeof(svn_client_ctx_t));
 
   (*ctx)->notify_func2 = call_notify_func;
@@ -93,8 +94,7 @@ svn_client_create_context2(svn_client_ct
   (*ctx)->config = cfg_hash;
 
   if (cfg_hash)
-    cfg_config = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
-                              APR_HASH_KEY_STRING);
+    cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
   else
     cfg_config = NULL;
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/delete.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/delete.c Fri May 10 14:58:47 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include <apr_file_io.h>
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 #include "svn_wc.h"
@@ -98,26 +99,23 @@ find_undeletables(void *baton,
   return SVN_NO_ERROR;
 }
 
-/* Verify that the path can be deleted without losing stuff,
-   i.e. ensure that there are no modified or unversioned resources
-   under PATH.  This is similar to checking the output of the status
-   command.  CTX is used for the client's config options.  POOL is
-   used for all temporary allocations. */
+/* Check whether LOCAL_ABSPATH is an external and raise an error if it is.
+
+   A file external should not be deleted since the file external is
+   implemented as a switched file and it would delete the file the
+   file external is switched to, which is not the behavior the user
+   would probably want.
+
+   A directory external should not be deleted since it is the root
+   of a different working copy. */
 static svn_error_t *
-can_delete_node(svn_boolean_t *target_missing,
-                const char *local_abspath,
-                svn_client_ctx_t *ctx,
-                apr_pool_t *scratch_pool)
+check_external(const char *local_abspath,
+               svn_client_ctx_t *ctx,
+               apr_pool_t *scratch_pool)
 {
   svn_node_kind_t external_kind;
   const char *defining_abspath;
-  apr_array_header_t *ignores;
-  struct can_delete_baton_t cdt;
 
-  /* A file external should not be deleted since the file external is
-     implemented as a switched file and it would delete the file the
-     file external is switched to, which is not the behavior the user
-     would probably want. */
   SVN_ERR(svn_wc__read_external_info(&external_kind, &defining_abspath, NULL,
                                      NULL, NULL,
                                      ctx->wc_ctx, local_abspath,
@@ -134,6 +132,22 @@ can_delete_node(svn_boolean_t *target_mi
                              svn_dirent_local_style(defining_abspath,
                                                     scratch_pool));
 
+  return SVN_NO_ERROR;
+}
+
+/* Verify that the path can be deleted without losing stuff,
+   i.e. ensure that there are no modified or unversioned resources
+   under PATH.  This is similar to checking the output of the status
+   command.  CTX is used for the client's config options.  POOL is
+   used for all temporary allocations. */
+static svn_error_t *
+can_delete_node(svn_boolean_t *target_missing,
+                const char *local_abspath,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *scratch_pool)
+{
+  apr_array_header_t *ignores;
+  struct can_delete_baton_t cdt;
 
   /* Use an infinite-depth status check to see if there's anything in
      or under PATH which would make it unsafe for deletion.  The
@@ -248,6 +262,16 @@ single_repos_delete(svn_ra_session_t *ra
   return svn_error_trace(editor->close_edit(edit_baton, pool));
 }
 
+
+/* Structure for tracking remote delete targets associated with a
+   specific repository. */
+struct repos_deletables_t
+{
+  svn_ra_session_t *ra_session;
+  apr_array_header_t *target_uris;
+};
+
+
 static svn_error_t *
 delete_urls_multi_repos(const apr_array_header_t *uris,
                         const apr_hash_t *revprop_table,
@@ -256,90 +280,130 @@ delete_urls_multi_repos(const apr_array_
                         svn_client_ctx_t *ctx,
                         apr_pool_t *pool)
 {
-  apr_hash_t *sessions = apr_hash_make(pool);
-  apr_hash_t *relpaths = apr_hash_make(pool);
+  apr_hash_t *deletables = apr_hash_make(pool);
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
   int i;
 
-  /* Create a hash of repos_root -> ra_session maps and repos_root -> relpaths
-     maps, used to group the various targets. */
+  /* Create a hash mapping repository root URLs -> repos_deletables_t *
+     structures.  */
   for (i = 0; i < uris->nelts; i++)
     {
       const char *uri = APR_ARRAY_IDX(uris, i, const char *);
-      svn_ra_session_t *ra_session = NULL;
-      const char *repos_root = NULL;
-      const char *repos_relpath = NULL;
-      apr_array_header_t *relpaths_list;
+      struct repos_deletables_t *repos_deletables = NULL;
+      const char *repos_relpath;
       svn_node_kind_t kind;
 
-      for (hi = apr_hash_first(pool, sessions); hi; hi = apr_hash_next(hi))
+      for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
         {
-          repos_root = svn__apr_hash_index_key(hi);
-          repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
+          const char *repos_root = svn__apr_hash_index_key(hi);
 
+          repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
           if (repos_relpath)
             {
-              /* Great!  We've found another uri underneath this session,
-                 store it and move on. */
-              ra_session = svn__apr_hash_index_val(hi);
-              relpaths_list = apr_hash_get(relpaths, repos_root,
-                                           APR_HASH_KEY_STRING);
-
-              APR_ARRAY_PUSH(relpaths_list, const char *) = repos_relpath;
+              /* Great!  We've found another URI underneath this
+                 session.  We'll pick out the related RA session for
+                 use later, store the new target, and move on.  */
+              repos_deletables = svn__apr_hash_index_val(hi);
+              APR_ARRAY_PUSH(repos_deletables->target_uris, const char *) =
+                apr_pstrdup(pool, uri);
               break;
             }
         }
 
-      if (!ra_session)
+      /* If we haven't created a repos_deletable structure for this
+         delete target, we need to do.  That means opening up an RA
+         session and initializing its targets list.  */
+      if (!repos_deletables)
         {
-          /* If we haven't found a session yet, we need to open one up.
-             Note that we don't have a local directory, nor a place
-             to put temp files. */
+          svn_ra_session_t *ra_session = NULL;
+          const char *repos_root;
+          apr_array_header_t *target_uris;
+
+          /* Open an RA session to (ultimately) the root of the
+             repository in which URI is found.  */
           SVN_ERR(svn_client_open_ra_session2(&ra_session, uri, NULL,
                                               ctx, pool, pool));
           SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
           SVN_ERR(svn_ra_reparent(ra_session, repos_root, pool));
-
-          apr_hash_set(sessions, repos_root, APR_HASH_KEY_STRING, ra_session);
           repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
 
-          relpaths_list = apr_array_make(pool, 1, sizeof(const char *));
-          apr_hash_set(relpaths, repos_root, APR_HASH_KEY_STRING,
-                       relpaths_list);
-          APR_ARRAY_PUSH(relpaths_list, const char *) = repos_relpath;
+          /* Make a new relpaths list for this repository, and add
+             this URI's relpath to it. */
+          target_uris = apr_array_make(pool, 1, sizeof(const char *));
+          APR_ARRAY_PUSH(target_uris, const char *) = apr_pstrdup(pool, uri);
+
+          /* Build our repos_deletables_t item and stash it in the
+             hash. */
+          repos_deletables = apr_pcalloc(pool, sizeof(*repos_deletables));
+          repos_deletables->ra_session = ra_session;
+          repos_deletables->target_uris = target_uris;
+          svn_hash_sets(deletables, repos_root, repos_deletables);
         }
 
-      /* Check we identified a non-root relpath.  Return an RA error
-         code for 1.6 compatibility. */
+      /* If we get here, we should have been able to calculate a
+         repos_relpath for this URI.  Let's make sure.  (We return an
+         RA error code otherwise for 1.6 compatibility.)  */
       if (!repos_relpath || !*repos_relpath)
         return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                                  "URL '%s' not within a repository", uri);
 
-      /* Now, test to see if the thing actually exists. */
-      SVN_ERR(svn_ra_check_path(ra_session, repos_relpath, SVN_INVALID_REVNUM,
-                                &kind, pool));
+      /* Now, test to see if the thing actually exists in HEAD. */
+      SVN_ERR(svn_ra_check_path(repos_deletables->ra_session, repos_relpath,
+                                SVN_INVALID_REVNUM, &kind, pool));
       if (kind == svn_node_none)
         return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
                                  "URL '%s' does not exist", uri);
     }
 
-  /* At this point, we should have two hashs:
-      SESSIONS maps repos_roots to ra_sessions.
-      RELPATHS maps repos_roots to a list of decoded relpaths for that root.
-
-     Now we iterate over the collection of sessions and do a commit for each
-     one with the collected relpaths. */
-  for (hi = apr_hash_first(pool, sessions); hi; hi = apr_hash_next(hi))
+  /* Now we iterate over the DELETABLES hash, issuing a commit for
+     each repository with its associated collected targets. */
+  iterpool = svn_pool_create(pool);
+  for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
     {
       const char *repos_root = svn__apr_hash_index_key(hi);
-      svn_ra_session_t *ra_session = svn__apr_hash_index_val(hi);
-      const apr_array_header_t *relpaths_list =
-        apr_hash_get(relpaths, repos_root, APR_HASH_KEY_STRING);
+      struct repos_deletables_t *repos_deletables = svn__apr_hash_index_val(hi);
+      const char *base_uri;
+      apr_array_header_t *target_relpaths;
+
+      svn_pool_clear(iterpool);
+
+      /* We want to anchor the commit on the longest common path
+         across the targets for this one repository.  If, however, one
+         of our targets is that longest common path, we need instead
+         anchor the commit on that path's immediate parent.  Because
+         we're asking svn_uri_condense_targets() to remove
+         redundancies, this situation should be detectable by their
+         being returned either a) only a single, empty-path, target
+         relpath, or b) no target relpaths at all.  */
+      SVN_ERR(svn_uri_condense_targets(&base_uri, &target_relpaths,
+                                       repos_deletables->target_uris,
+                                       TRUE, iterpool, iterpool));
+      SVN_ERR_ASSERT(!svn_path_is_empty(base_uri));
+      if (target_relpaths->nelts == 0)
+        {
+          const char *target_relpath;
 
-      SVN_ERR(single_repos_delete(ra_session, repos_root, relpaths_list,
+          svn_uri_split(&base_uri, &target_relpath, base_uri, iterpool);
+          APR_ARRAY_PUSH(target_relpaths, const char *) = target_relpath;
+        }
+      else if ((target_relpaths->nelts == 1)
+               && (svn_path_is_empty(APR_ARRAY_IDX(target_relpaths, 0,
+                                                   const char *))))
+        {
+          const char *target_relpath;
+
+          svn_uri_split(&base_uri, &target_relpath, base_uri, iterpool);
+          APR_ARRAY_IDX(target_relpaths, 0, const char *) = target_relpath;
+        }
+
+      SVN_ERR(svn_ra_reparent(repos_deletables->ra_session, base_uri, pool));
+      SVN_ERR(single_repos_delete(repos_deletables->ra_session, repos_root,
+                                  target_relpaths,
                                   revprop_table, commit_callback,
-                                  commit_baton, ctx, pool));
+                                  commit_baton, ctx, iterpool));
     }
+  svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;
 }
@@ -358,6 +422,8 @@ svn_client__wc_delete(const char *local_
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
+  SVN_ERR(check_external(local_abspath, ctx, pool));
+
   if (!force && !keep_local)
     /* Verify that there are no "awkward" files */
     SVN_ERR(can_delete_node(&target_missing, local_abspath, ctx, pool));
@@ -393,6 +459,8 @@ svn_client__wc_delete_many(const apr_arr
 
       SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
+      SVN_ERR(check_external(local_abspath, ctx, pool));
+
       if (!force && !keep_local)
         {
           svn_boolean_t missing;
@@ -479,13 +547,11 @@ svn_client_delete4(const apr_array_heade
                                           pool));
           SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
                                      local_abspath, pool, iterpool));
-          targets = apr_hash_get(wcroots, wcroot_abspath,
-                                 APR_HASH_KEY_STRING);
+          targets = svn_hash_gets(wcroots, wcroot_abspath);
           if (targets == NULL)
             {
               targets = apr_array_make(pool, 1, sizeof(const char *));
-              apr_hash_set(wcroots, wcroot_abspath, APR_HASH_KEY_STRING,
-                           targets);
+              svn_hash_sets(wcroots, wcroot_abspath, targets);
              }
 
           /* Make sure targets are unique. */

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/deprecated.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/deprecated.c Fri May 10 14:58:47 2013
@@ -36,6 +36,7 @@
 #include "svn_client.h"
 #include "svn_path.h"
 #include "svn_compat.h"
+#include "svn_hash.h"
 #include "svn_props.h"
 #include "svn_utf.h"
 #include "svn_string.h"
@@ -1327,7 +1328,7 @@ list_func_wrapper(void *baton,
   struct list_func_wrapper_baton *lfwb = baton;
 
   if (lfwb->list_func1)
-    return lfwb->list_func1(lfwb->list_func1_baton, path, dirent, 
+    return lfwb->list_func1(lfwb->list_func1_baton, path, dirent,
                            lock, abs_path, scratch_pool);
 
   return SVN_NO_ERROR;
@@ -1343,7 +1344,7 @@ wrap_list_func(svn_client_list_func2_t *
                void *baton,
                apr_pool_t *result_pool)
 {
-  struct list_func_wrapper_baton *lfwb = apr_palloc(result_pool, 
+  struct list_func_wrapper_baton *lfwb = apr_palloc(result_pool,
                                                     sizeof(*lfwb));
 
   /* Set the user provided old format callback in the baton. */
@@ -1371,8 +1372,8 @@ svn_client_list2(const char *path_or_url
 
   wrap_list_func(&list_func2, &list_func2_baton, list_func, baton, pool);
 
-  return svn_client_list3(path_or_url, peg_revision, revision, depth, 
-                          dirent_fields, fetch_locks, 
+  return svn_client_list3(path_or_url, peg_revision, revision, depth,
+                          dirent_fields, fetch_locks,
                           FALSE /* include externals */,
                           list_func2, list_func2_baton, ctx, pool);
 }
@@ -1431,17 +1432,17 @@ store_dirent(void *baton, const char *pa
       if (dirent->kind == svn_node_file)
         {
           const char *base_name = svn_path_basename(abs_path, lb->pool);
-          apr_hash_set(lb->dirents, base_name, APR_HASH_KEY_STRING, dirent);
+          svn_hash_sets(lb->dirents, base_name, dirent);
           if (lock)
-            apr_hash_set(lb->locks, base_name, APR_HASH_KEY_STRING, lock);
+            svn_hash_sets(lb->locks, base_name, lock);
         }
     }
   else
     {
       path = apr_pstrdup(lb->pool, path);
-      apr_hash_set(lb->dirents, path, APR_HASH_KEY_STRING, dirent);
+      svn_hash_sets(lb->dirents, path, dirent);
       if (lock)
-        apr_hash_set(lb->locks, path, APR_HASH_KEY_STRING, lock);
+        svn_hash_sets(lb->locks, path, lock);
     }
 
   return SVN_NO_ERROR;
@@ -1975,7 +1976,7 @@ svn_client_propget3(apr_hash_t **props,
                                      svn_dirent_skip_ancestor(target, abspath),
                                      pool);
 
-          apr_hash_set(*props, relpath, APR_HASH_KEY_STRING, value);
+          svn_hash_sets(*props, relpath, value);
         }
     }
   else

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/diff.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/diff.c Fri May 10 14:58:47 2013
@@ -67,7 +67,7 @@
  * and WC_CTX, and return the result in *REPOS_RELPATH.
  * ORIG_TARGET is the related original target passed to the diff command,
  * and may be used to derive leading path components missing from PATH.
- * ANCHOR is the local path where the diff editor is anchored. 
+ * ANCHOR is the local path where the diff editor is anchored.
  * Do all allocations in POOL. */
 static svn_error_t *
 make_repos_relpath(const char **repos_relpath,
@@ -183,7 +183,7 @@ adjust_paths_for_diff_labels(const char 
        not for file URLs.  Nor can we just use anchor1 and anchor2
        from do_diff(), at least not without some more logic here.
        What a nightmare.
-       
+
        For now, to distinguish the two paths, we'll just put the
        unique portions of the original targets in parentheses after
        the received path, with ellipses for handwaving.  This makes
@@ -692,7 +692,7 @@ diff_dir_props_changed(svn_wc_notify_sta
 /* Show differences between TMPFILE1 and TMPFILE2. DIFF_RELPATH, REV1, and
    REV2 are used in the headers to indicate the file and revisions.  If either
    MIMETYPE1 or MIMETYPE2 indicate binary content, don't show a diff,
-   but instead print a warning message. 
+   but instead print a warning message.
 
    If FORCE_DIFF is TRUE, always write a diff, even for empty diffs.
 
@@ -954,7 +954,7 @@ diff_file_changed(svn_wc_notify_state_t 
   if (tmpfile1)
     SVN_ERR(diff_content_changed(&wrote_header, diff_relpath,
                                  tmpfile1, tmpfile2, rev1, rev2,
-                                 mimetype1, mimetype2, 
+                                 mimetype1, mimetype2,
                                  svn_diff_op_modified, FALSE,
                                  NULL,
                                  SVN_INVALID_REVNUM, diff_cmd_baton,
@@ -1764,7 +1764,7 @@ diff_repos_repos(const svn_wc_diff_callb
   SVN_ERR(svn_client__get_diff_editor2(
                 &diff_editor, &diff_edit_baton,
                 extra_ra_session, depth,
-                rev1, 
+                rev1,
                 TRUE /* text_deltas */,
                 diff_processor,
                 ctx->cancel_func, ctx->cancel_baton,
@@ -1972,7 +1972,7 @@ diff_repos_wc(const char *path_or_url1,
         }
       SVN_ERR(svn_ra_reparent(ra_session, copyfrom_parent_url, pool));
 
-      /* Tell the RA layer we want a delta to change our txn to URL1 */ 
+      /* Tell the RA layer we want a delta to change our txn to URL1 */
       SVN_ERR(svn_ra_do_diff3(ra_session,
                               &reporter, &reporter_baton,
                               rev,
@@ -2008,7 +2008,7 @@ diff_repos_wc(const char *path_or_url1,
     }
   else
     {
-      /* Tell the RA layer we want a delta to change our txn to URL1 */ 
+      /* Tell the RA layer we want a delta to change our txn to URL1 */
       SVN_ERR(svn_ra_do_diff3(ra_session,
                               &reporter, &reporter_baton,
                               rev,
@@ -2451,8 +2451,7 @@ set_up_diff_cmd_and_options(struct diff_
   /* See if there is a diff command and/or diff arguments. */
   if (config)
     {
-      svn_config_t *cfg = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
-                                       APR_HASH_KEY_STRING);
+      svn_config_t *cfg = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
       svn_config_get(cfg, &diff_cmd, SVN_CONFIG_SECTION_HELPERS,
                      SVN_CONFIG_OPTION_DIFF_CMD, NULL);
       if (options == NULL)

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/diff_local.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/diff_local.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/diff_local.c Fri May 10 14:58:47 2013
@@ -30,6 +30,7 @@
 #include <apr_strings.h>
 #include <apr_pools.h>
 #include <apr_hash.h>
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_wc.h"
 #include "svn_diff.h"
@@ -126,8 +127,7 @@ do_arbitrary_files_diff(const char *loca
                          scratch_pool));
 
   /* Try to determine the mime-type of each file. */
-  original_mime_type = apr_hash_get(original_props, SVN_PROP_MIME_TYPE,
-                                    APR_HASH_KEY_STRING);
+  original_mime_type = svn_hash_gets(original_props, SVN_PROP_MIME_TYPE);
   if (!file1_is_empty && !original_mime_type)
     {
       const char *mime_type;
@@ -138,8 +138,7 @@ do_arbitrary_files_diff(const char *loca
         original_mime_type = svn_string_create(mime_type, scratch_pool);
     }
 
-  modified_mime_type = apr_hash_get(modified_props, SVN_PROP_MIME_TYPE,
-                                    APR_HASH_KEY_STRING);
+  modified_mime_type = svn_hash_gets(modified_props, SVN_PROP_MIME_TYPE);
   if (!file2_is_empty && !modified_mime_type)
     {
       const char *mime_type;
@@ -194,8 +193,7 @@ do_arbitrary_files_diff(const char *loca
       /* Wrap with normalization, etc. if necessary */
       if (original_props)
         {
-          val = apr_hash_get(original_props, SVN_PROP_EOL_STYLE,
-                             APR_HASH_KEY_STRING);
+          val = svn_hash_gets(original_props, SVN_PROP_EOL_STYLE);
 
           if (val)
             {
@@ -213,8 +211,7 @@ do_arbitrary_files_diff(const char *loca
 
       if (modified_props)
         {
-          val = apr_hash_get(modified_props, SVN_PROP_EOL_STYLE,
-                             APR_HASH_KEY_STRING);
+          val = svn_hash_gets(modified_props, SVN_PROP_EOL_STYLE);
 
           if (val)
             {
@@ -471,13 +468,13 @@ arbitrary_diff_this_dir(struct arbitrary
       if (strcmp(name, SVN_WC_ADM_DIR_NAME) == 0)
         continue;
 
-      dirent1 = apr_hash_get(dirents1, name, APR_HASH_KEY_STRING);
+      dirent1 = svn_hash_gets(dirents1, name);
       if (!dirent1)
         {
           dirent1 = svn_io_dirent2_create(iterpool);
           dirent1->kind = svn_node_none;
         }
-      dirent2 = apr_hash_get(dirents2, name, APR_HASH_KEY_STRING);
+      dirent2 = svn_hash_gets(dirents2, name);
       if (!dirent2)
         {
           dirent2 = svn_io_dirent2_create(iterpool);

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/diff_summarize.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/diff_summarize.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/diff_summarize.c Fri May 10 14:58:47 2013
@@ -24,6 +24,7 @@
 
 
 #include "svn_dirent_uri.h"
+#include "svn_hash.h"
 #include "svn_props.h"
 #include "svn_pools.h"
 
@@ -185,7 +186,7 @@ cb_dir_closed(svn_wc_notify_state_t *con
   if (! svn_relpath_skip_ancestor(b->target, path))
     return SVN_NO_ERROR;
 
-  prop_change = apr_hash_get(b->prop_changes, path, APR_HASH_KEY_STRING) != NULL;
+  prop_change = svn_hash_gets(b->prop_changes, path) != NULL;
   if (dir_was_added || prop_change)
     SVN_ERR(send_summary(b, path,
                          dir_was_added ? svn_client_diff_summarize_kind_added
@@ -275,7 +276,7 @@ cb_dir_props_changed(svn_wc_notify_state
   struct summarize_baton_t *b = diff_baton;
 
   if (props_changed(propchanges, scratch_pool))
-    apr_hash_set(b->prop_changes, path, APR_HASH_KEY_STRING, path);
+    svn_hash_sets(b->prop_changes, path, path);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/export.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/export.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/export.c Fri May 10 14:58:47 2013
@@ -34,6 +34,7 @@
 #include "svn_string.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_subst.h"
@@ -68,9 +69,9 @@ add_externals(apr_hash_t *externals,
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
 
-  apr_hash_set(externals, local_abspath, APR_HASH_KEY_STRING,
-               apr_pstrmemdup(pool, externals_prop_val->data,
-                              externals_prop_val->len));
+  svn_hash_sets(externals, local_abspath,
+                apr_pstrmemdup(pool, externals_prop_val->data,
+                               externals_prop_val->len));
 
   return SVN_NO_ERROR;
 }
@@ -192,7 +193,7 @@ export_node(void *baton,
   svn_stream_t *dst_stream;
   const char *dst_tmp;
   svn_error_t *err;
-  
+
   const char *to_abspath = svn_dirent_join(
                                 eib->to_path,
                                 svn_dirent_skip_ancestor(eib->origin_abspath,
@@ -338,8 +339,7 @@ export_node(void *baton,
     }
 
   /* We can early-exit if we're creating a special file. */
-  special = apr_hash_get(props, SVN_PROP_SPECIAL,
-                         APR_HASH_KEY_STRING);
+  special = svn_hash_gets(props, SVN_PROP_SPECIAL);
   if (special != NULL)
     {
       /* Create the destination as a special file, and copy the source
@@ -352,12 +352,9 @@ export_node(void *baton,
     }
 
 
-  eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE,
-                           APR_HASH_KEY_STRING);
-  keywords = apr_hash_get(props, SVN_PROP_KEYWORDS,
-                          APR_HASH_KEY_STRING);
-  executable = apr_hash_get(props, SVN_PROP_EXECUTABLE,
-                            APR_HASH_KEY_STRING);
+  eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+  keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
+  executable = svn_hash_gets(props, SVN_PROP_EXECUTABLE);
 
   if (eol_style)
     SVN_ERR(get_eol_style(&style, &eol, eol_style->data, eib->native_eol));
@@ -395,10 +392,11 @@ export_node(void *baton,
           suffix = "";
         }
 
-      SVN_ERR(svn_subst_build_keywords2
-              (&kw, keywords->data,
-               apr_psprintf(scratch_pool, "%ld%s", changed_rev, suffix),
-               url, tm, author, scratch_pool));
+      SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data,
+                                        apr_psprintf(scratch_pool, "%ld%s",
+                                                     changed_rev, suffix),
+                                        url, status->repos_root_url, tm,
+                                        author, scratch_pool));
     }
 
   /* For atomicity, we translate to a tmp file and then rename the tmp file
@@ -498,6 +496,7 @@ open_root_internal(const char *path,
 
 struct edit_baton
 {
+  const char *repos_root_url;
   const char *root_path;
   const char *root_url;
   svn_boolean_t force;
@@ -544,6 +543,7 @@ struct file_baton
   /* Any keyword vals to be substituted */
   const char *revision;
   const char *url;
+  const char *repos_root_url;
   const char *author;
   apr_time_t date;
 
@@ -665,6 +665,7 @@ add_file(const char *path,
   fb->edit_baton = eb;
   fb->path = full_path;
   fb->url = full_url;
+  fb->repos_root_url = eb->repos_root_url;
   fb->pool = pool;
 
   *baton = fb;
@@ -830,8 +831,9 @@ close_file(void *file_baton,
         }
 
       if (fb->keywords_val)
-        SVN_ERR(svn_subst_build_keywords2(&final_kw, fb->keywords_val->data,
-                                          fb->revision, fb->url, fb->date,
+        SVN_ERR(svn_subst_build_keywords3(&final_kw, fb->keywords_val->data,
+                                          fb->revision, fb->url,
+                                          fb->repos_root_url, fb->date,
                                           fb->author, pool));
 
       SVN_ERR(svn_subst_copy_and_translate4(fb->tmppath, fb->path,
@@ -901,7 +903,7 @@ get_editor_ev1(const svn_delta_editor_t 
                apr_pool_t *scratch_pool)
 {
   svn_delta_editor_t *editor = svn_delta_default_editor(result_pool);
-  
+
   editor->set_target_revision = set_target_revision;
   editor->open_root = open_root;
   editor->add_directory = add_directory;
@@ -951,33 +953,29 @@ add_file_ev2(void *baton,
   /* Any keyword vals to be substituted */
   const char *revision = NULL;
   const char *author = NULL;
-  apr_time_t date = 0; 
+  apr_time_t date = 0;
 
   /* Look at any properties for additional information. */
-  if ( (val = apr_hash_get(props, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_EOL_STYLE)) )
     eol_style_val = val;
 
-  if ( !eb->ignore_keywords && (val = apr_hash_get(props, SVN_PROP_KEYWORDS,
-                                                   APR_HASH_KEY_STRING)) )
+  if ( !eb->ignore_keywords && (val = svn_hash_gets(props, SVN_PROP_KEYWORDS)) )
     keywords_val = val;
 
-  if ( (val = apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_EXECUTABLE)) )
     executable_val = val;
-  
+
   /* Try to fill out the baton's keywords-structure too. */
-  if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_REV,
-                           APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_REV)) )
     revision = val->data;
 
-  if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_DATE,
-                           APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE)) )
     SVN_ERR(svn_time_from_cstring(&date, val->data, scratch_pool));
-  
-  if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_LAST_AUTHOR,
-                           APR_HASH_KEY_STRING)) )
+
+  if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR)) )
     author = val->data;
 
-  if ( (val = apr_hash_get(props, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_SPECIAL)) )
     special = TRUE;
 
   if (special)
@@ -1019,9 +1017,10 @@ add_file_ev2(void *baton,
             }
 
           if (keywords_val)
-            SVN_ERR(svn_subst_build_keywords2(&final_kw, keywords_val->data,
-                                              revision, full_url, date,
-                                              author, scratch_pool));
+            SVN_ERR(svn_subst_build_keywords3(&final_kw, keywords_val->data,
+                                              revision, full_url,
+                                              eb->repos_root_url,
+                                              date, author, scratch_pool));
 
           /* Writing through a translated stream is more efficient than
              reading through one, so we wrap TMP_STREAM and not CONTENTS. */
@@ -1081,9 +1080,9 @@ add_directory_ev2(void *baton,
                              _("'%s' already exists"),
                              svn_dirent_local_style(full_path, scratch_pool));
 
-  if ( (val = apr_hash_get(props, SVN_PROP_EXTERNALS, APR_HASH_KEY_STRING)) )
+  if ( (val = svn_hash_gets(props, SVN_PROP_EXTERNALS)) )
     SVN_ERR(add_externals(eb->externals, full_path, val));
-  
+
   if (eb->notify_func)
     {
       svn_wc_notify_t *notify = svn_wc_create_notify(full_path,
@@ -1254,6 +1253,7 @@ export_file(const char *from_path_or_url
   fb->path = eb->root_path;
   fb->url = eb->root_url;
   fb->pool = scratch_pool;
+  fb->repos_root_url = eb->repos_root_url;
 
   /* Copied from apply_textdelta(). */
   SVN_ERR(svn_stream_open_unique(&fb->tmp_stream, &fb->tmppath,
@@ -1303,7 +1303,6 @@ export_directory(const char *from_path_o
   const svn_delta_editor_t *export_editor;
   const svn_ra_reporter3_t *reporter;
   void *report_baton;
-  svn_boolean_t use_sleep = FALSE;
   svn_node_kind_t kind;
 
   if (!ENABLE_EV2_IMPL)
@@ -1314,13 +1313,15 @@ export_directory(const char *from_path_o
                            scratch_pool, scratch_pool));
 
   /* Manufacture a basic 'report' to the update reporter. */
-  SVN_ERR(svn_ra_do_update2(ra_session,
+  SVN_ERR(svn_ra_do_update3(ra_session,
                             &reporter, &report_baton,
                             loc->rev,
                             "", /* no sub-target */
                             depth,
                             FALSE, /* don't want copyfrom-args */
-                            export_editor, edit_baton, scratch_pool));
+                            FALSE, /* don't want ignore_ancestry */
+                            export_editor, edit_baton,
+                            scratch_pool, scratch_pool));
 
   SVN_ERR(reporter->set_path(report_baton, "", loc->rev,
                              /* Depth is irrelevant, as we're
@@ -1348,17 +1349,14 @@ export_directory(const char *from_path_o
 
   if (! ignore_externals && depth == svn_depth_infinity)
     {
-      const char *repos_root_url;
       const char *to_abspath;
 
-      SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
-                                     scratch_pool));
       SVN_ERR(svn_dirent_get_absolute(&to_abspath, to_path, scratch_pool));
       SVN_ERR(svn_client__export_externals(eb->externals,
                                            from_path_or_url,
-                                           to_abspath, repos_root_url,
+                                           to_abspath, eb->repos_root_url,
                                            depth, native_eol,
-                                           ignore_keywords, &use_sleep,
+                                           ignore_keywords,
                                            ctx, scratch_pool));
     }
 
@@ -1410,6 +1408,7 @@ svn_client_export5(svn_revnum_t *result_
                                                 peg_revision,
                                                 revision, ctx, pool));
 
+      SVN_ERR(svn_ra_get_repos_root2(ra_session, &eb->repos_root_url, pool));
       eb->root_path = to_path;
       eb->root_url = loc->url;
       eb->force = overwrite;

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/externals.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/externals.c Fri May 10 14:58:47 2013
@@ -24,10 +24,11 @@
 /* ==================================================================== */
 
 
- 
+
 /*** Includes. ***/
 
 #include <apr_uri.h>
+#include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_pools.h"
 #include "svn_client.h"
@@ -41,7 +42,7 @@
 
 #include "svn_private_config.h"
 #include "private/svn_wc_private.h"
- 
+
 
 /* Remove the directory at LOCAL_ABSPATH from revision control, and do the
  * same to any revision controlled directories underneath LOCAL_ABSPATH
@@ -358,9 +359,9 @@ switch_file_external(const char *local_a
                      svn_client_ctx_t *ctx,
                      apr_pool_t *scratch_pool)
 {
-  svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
-                                                 SVN_CONFIG_CATEGORY_CONFIG,
-                                                 APR_HASH_KEY_STRING) : NULL;
+  svn_config_t *cfg = ctx->config
+                      ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+                      : NULL;
   svn_boolean_t use_commit_times;
   const char *diff3_cmd;
   const char *preserved_exts_str;
@@ -907,8 +908,7 @@ handle_externals_change(svn_client_ctx_t
                         iterpool));
         }
 
-      old_defining_abspath = apr_hash_get(old_externals, target_abspath,
-                                          APR_HASH_KEY_STRING);
+      old_defining_abspath = svn_hash_gets(old_externals, target_abspath);
 
       SVN_ERR(wrap_external_error(
                       ctx, target_abspath,
@@ -924,7 +924,7 @@ handle_externals_change(svn_client_ctx_t
 
       /* And remove already processed items from the to-remove hash */
       if (old_defining_abspath)
-        apr_hash_set(old_externals, target_abspath, APR_HASH_KEY_STRING, NULL);
+        svn_hash_sets(old_externals, target_abspath, NULL);
     }
 
   svn_pool_destroy(iterpool);
@@ -1048,7 +1048,6 @@ svn_client__export_externals(apr_hash_t 
                              svn_depth_t requested_depth,
                              const char *native_eol,
                              svn_boolean_t ignore_keywords,
-                             svn_boolean_t *timestamp_sleep,
                              svn_client_ctx_t *ctx,
                              apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/import.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/import.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/import.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/import.c Fri May 10 14:58:47 2013
@@ -32,6 +32,7 @@
 #include <apr_hash.h>
 #include <apr_md5.h>
 
+#include "svn_hash.h"
 #include "svn_ra.h"
 #include "svn_delta.h"
 #include "svn_subst.h"
@@ -116,7 +117,7 @@ send_file_contents(const char *local_abs
                                    sizeof(SVN_PROP_EOL_STYLE) - 1);
       keywords_val = apr_hash_get(properties, SVN_PROP_KEYWORDS,
                                   sizeof(SVN_PROP_KEYWORDS) - 1);
-      if (apr_hash_get(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING))
+      if (svn_hash_gets(properties, SVN_PROP_SPECIAL))
         special = TRUE;
     }
 
@@ -133,9 +134,9 @@ send_file_contents(const char *local_abs
     }
 
   if (keywords_val)
-    SVN_ERR(svn_subst_build_keywords2(&keywords, keywords_val->data,
+    SVN_ERR(svn_subst_build_keywords3(&keywords, keywords_val->data,
                                       APR_STRINGIFY(SVN_INVALID_REVNUM),
-                                      "", 0, "", pool));
+                                      "", "", 0, "", pool));
   else
     keywords = NULL;
 
@@ -262,12 +263,11 @@ import_file(const svn_delta_editor_t *ed
      send to the server. */
   if (dirent->special)
     {
-      apr_hash_set(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING,
-                   svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
+      svn_hash_sets(properties, SVN_PROP_SPECIAL,
+                    svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
       SVN_ERR(editor->change_file_prop(file_baton, SVN_PROP_SPECIAL,
-                                       apr_hash_get(properties,
-                                                    SVN_PROP_SPECIAL,
-                                                    APR_HASH_KEY_STRING),
+                                       svn_hash_gets(properties,
+                                                     SVN_PROP_SPECIAL),
                                        pool));
     }
 
@@ -341,26 +341,26 @@ get_filtered_children(apr_hash_t **child
               (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
             }
 
-          apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(dirents, base_name, NULL);
           continue;
         }
             /* If this is an excluded path, exclude it. */
-      if (apr_hash_get(excludes, local_abspath, APR_HASH_KEY_STRING))
+      if (svn_hash_gets(excludes, local_abspath))
         {
-          apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(dirents, base_name, NULL);
           continue;
         }
 
       if (ignores && svn_wc_match_ignore_list(base_name, ignores, iterpool))
         {
-          apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(dirents, base_name, NULL);
           continue;
         }
 
       if (global_ignores &&
           svn_wc_match_ignore_list(base_name, global_ignores, iterpool))
         {
-          apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+          svn_hash_sets(dirents, base_name, NULL);
           continue;
         }
 
@@ -373,7 +373,7 @@ get_filtered_children(apr_hash_t **child
 
           if (filter)
             {
-              apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+              svn_hash_sets(dirents, base_name, NULL);
               continue;
             }
         }
@@ -669,7 +669,8 @@ import(const char *local_abspath,
                             pool, &root_baton));
 
   /* Import a file or a directory tree. */
-  SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, FALSE, pool, pool));
+  SVN_ERR(svn_io_stat_dirent2(&dirent, local_abspath, FALSE, FALSE,
+                              pool, pool));
 
   /* Make the intermediate directory components necessary for properly
      rooting our import source tree.  */
@@ -839,7 +840,7 @@ svn_client_import5(const char *path,
         {
           const char *abs_path;
           SVN_ERR(svn_dirent_get_absolute(&abs_path, tmp_file, scratch_pool));
-          apr_hash_set(excludes, abs_path, APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(excludes, abs_path, (void *)1);
         }
     }
 
@@ -934,8 +935,7 @@ svn_client_import5(const char *path,
 
       if (apr_hash_count(local_ignores_hash))
         {
-          svn_string_t *propval = apr_hash_get(local_ignores_hash, url,
-                                               APR_HASH_KEY_STRING);
+          svn_string_t *propval = svn_hash_gets(local_ignores_hash, url);
           if (propval)
             {
               svn_cstring_split_append(local_ignores_arr, propval->data,

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/info.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/info.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/info.c Fri May 10 14:58:47 2013
@@ -142,7 +142,7 @@ push_dir_info(svn_ra_session_t *ra_sessi
       child_pathrev = svn_client__pathrev_join_relpath(pathrev, name, subpool);
       fs_path = svn_client__pathrev_fspath(child_pathrev, subpool);
 
-      lock = apr_hash_get(locks, fs_path, APR_HASH_KEY_STRING);
+      lock = svn_hash_gets(locks, fs_path);
 
       SVN_ERR(build_info_from_dirent(&info, the_ent, lock, child_pathrev,
                                      subpool));

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/iprops.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/iprops.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/iprops.c Fri May 10 14:58:47 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include "svn_error.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_wc.h"
 #include "svn_ra.h"
@@ -117,7 +118,7 @@ svn_client__iprop_relpaths_to_urls(apr_a
         {
           elt->path_or_url = svn_path_url_add_component2(repos_root_url,
                                                          elt->path_or_url,
-                                                         result_pool);      
+                                                         result_pool);
         }
     }
   return SVN_NO_ERROR;
@@ -154,7 +155,7 @@ get_inheritable_props(apr_hash_t **wcroo
      an external, then svn_wc__get_cached_iprop_children won't return
      LOCAL_ABSPATH in IPROPS_PATHS because the former has no cached iprops
      yet.  So make sure LOCAL_ABSPATH is present if it's a WC root. */
-  if (!apr_hash_get(iprop_paths, local_abspath, APR_HASH_KEY_STRING))
+  if (!svn_hash_gets(iprop_paths, local_abspath))
     {
       svn_boolean_t needs_cached_iprops;
 
@@ -167,8 +168,7 @@ get_inheritable_props(apr_hash_t **wcroo
 
           /* As value we set TARGET_ABSPATH, but any string besides ""
              would do */
-          apr_hash_set(iprop_paths, target_abspath,
-                       APR_HASH_KEY_STRING, target_abspath);
+          svn_hash_sets(iprop_paths, target_abspath, target_abspath);
         }
     }
 
@@ -217,10 +217,9 @@ get_inheritable_props(apr_hash_t **wcroo
               continue;
             }
 
-          apr_hash_set(*wcroot_iprops,
-                       apr_pstrdup(result_pool, child_abspath),
-                       APR_HASH_KEY_STRING,
-                       inherited_props);
+          svn_hash_sets(*wcroot_iprops,
+                        apr_pstrdup(result_pool, child_abspath),
+                        inherited_props);
         }
 
 

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/list.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/list.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/list.c Fri May 10 14:58:47 2013
@@ -23,6 +23,7 @@
 
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_time.h"
@@ -37,8 +38,8 @@
 #include "svn_private_config.h"
 
 /* Prototypes for referencing before declaration */
-static svn_error_t * 
-list_externals(apr_hash_t *externals, 
+static svn_error_t *
+list_externals(apr_hash_t *externals,
                svn_depth_t depth,
                apr_uint32_t dirent_fields,
                svn_boolean_t fetch_locks,
@@ -77,9 +78,9 @@ list_internal(const char *path_or_url,
    objects and FS_PATH is the absolute filesystem path of the RA session.
    Use SCRATCH_POOL for temporary allocations.
 
-   If the caller passes EXTERNALS as non-NULL, populate the EXTERNALS 
+   If the caller passes EXTERNALS as non-NULL, populate the EXTERNALS
    hash table whose keys are URLs of the directory which has externals
-   definitions, and whose values are the externals description text. 
+   definitions, and whose values are the externals description text.
    Allocate the hash's keys and values in RESULT_POOL.
 
    EXTERNAL_PARENT_URL and EXTERNAL_TARGET are set when external items
@@ -112,13 +113,13 @@ get_dir_contents(apr_uint32_t dirent_fie
 
   if (depth == svn_depth_empty)
     return SVN_NO_ERROR;
-  
+
   /* Get the directory's entries. If externals hash is non-NULL, get its
      properties also. Ignore any not-authorized errors.  */
-  err = svn_ra_get_dir2(ra_session, &tmpdirents, NULL, 
+  err = svn_ra_get_dir2(ra_session, &tmpdirents, NULL,
                         externals ? &prop_hash : NULL,
                         dir, rev, dirent_fields, scratch_pool);
-      
+
   if (err && ((err->apr_err == SVN_ERR_RA_NOT_AUTHORIZED) ||
               (err->apr_err == SVN_ERR_RA_DAV_FORBIDDEN)))
     {
@@ -126,28 +127,26 @@ get_dir_contents(apr_uint32_t dirent_fie
       return SVN_NO_ERROR;
     }
   SVN_ERR(err);
- 
- /* Filter out svn:externals from all properties hash. */ 
-  if (prop_hash) 
-    prop_val = apr_hash_get(prop_hash, SVN_PROP_EXTERNALS, 
-                            APR_HASH_KEY_STRING);
+
+ /* Filter out svn:externals from all properties hash. */
+  if (prop_hash)
+    prop_val = svn_hash_gets(prop_hash, SVN_PROP_EXTERNALS);
   if (prop_val)
     {
       const char *url;
 
       SVN_ERR(svn_ra_get_session_url(ra_session, &url, scratch_pool));
-      
-      apr_hash_set(externals, svn_path_url_add_component2(url, dir, 
-                                                          result_pool),
-                   APR_HASH_KEY_STRING, svn_string_dup(prop_val, 
-                                                       result_pool));
+
+      svn_hash_sets(externals,
+                    svn_path_url_add_component2(url, dir, result_pool),
+                    svn_string_dup(prop_val, result_pool));
     }
 
   if (ctx->cancel_func)
     SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
 
   /* Sort the hash, so we can call the callback in a "deterministic" order. */
-  array = svn_sort__hash(tmpdirents, svn_sort_compare_items_lexically, 
+  array = svn_sort__hash(tmpdirents, svn_sort_compare_items_lexically,
                          scratch_pool);
   for (i = 0; i < array->nelts; ++i)
     {
@@ -163,7 +162,7 @@ get_dir_contents(apr_uint32_t dirent_fie
       if (locks)
         {
           const char *abs_path = svn_fspath__join(fs_path, path, iterpool);
-          lock = apr_hash_get(locks, abs_path, APR_HASH_KEY_STRING);
+          lock = svn_hash_gets(locks, abs_path);
         }
       else
         lock = NULL;
@@ -173,12 +172,12 @@ get_dir_contents(apr_uint32_t dirent_fie
           || depth == svn_depth_infinity)
         SVN_ERR(list_func(baton, path, the_ent, lock, fs_path,
                           external_parent_url, external_target, iterpool));
-      
-      /* If externals is non-NULL, populate the externals hash table 
+
+      /* If externals is non-NULL, populate the externals hash table
          recursively for all directory entries. */
       if (depth == svn_depth_infinity && the_ent->kind == svn_node_dir)
         SVN_ERR(get_dir_contents(dirent_fields, path, rev,
-                                 ra_session, locks, fs_path, depth, ctx, 
+                                 ra_session, locks, fs_path, depth, ctx,
                                  externals, external_parent_url,
                                  external_target, list_func, baton,
                                  result_pool, iterpool));
@@ -240,8 +239,7 @@ svn_client__ra_stat_compatible(svn_ra_se
                                       NULL, "", rev, dirent_fields, subpool));
 
               /* Get the relevant entry. */
-              dirent = apr_hash_get(parent_ents, base_name,
-                                    APR_HASH_KEY_STRING);
+              dirent = svn_hash_gets(parent_ents, base_name);
 
               if (dirent)
                 *dirent_p = svn_dirent_dup(dirent, pool);
@@ -275,16 +273,14 @@ svn_client__ra_stat_compatible(svn_ra_se
 
                   SVN_ERR(svn_ra_rev_proplist(ra_session, rev, &props,
                                               pool));
-                  val = apr_hash_get(props, SVN_PROP_REVISION_DATE,
-                                     APR_HASH_KEY_STRING);
+                  val = svn_hash_gets(props, SVN_PROP_REVISION_DATE);
                   if (val)
                     SVN_ERR(svn_time_from_cstring(&dirent->time, val->data,
                                                   pool));
                   else
                     dirent->time = 0;
 
-                  val = apr_hash_get(props, SVN_PROP_REVISION_AUTHOR,
-                                     APR_HASH_KEY_STRING);
+                  val = svn_hash_gets(props, SVN_PROP_REVISION_AUTHOR);
                   dirent->last_author = val ? val->data : NULL;
                 }
 
@@ -301,36 +297,36 @@ svn_client__ra_stat_compatible(svn_ra_se
 }
 
 /* List the file/directory entries for PATH_OR_URL at REVISION.
-   The actual node revision selected is determined by the path as 
-   it exists in PEG_REVISION.  
-   
-   If DEPTH is svn_depth_infinity, then list all file and directory entries 
-   recursively.  Else if DEPTH is svn_depth_files, list all files under 
+   The actual node revision selected is determined by the path as
+   it exists in PEG_REVISION.
+
+   If DEPTH is svn_depth_infinity, then list all file and directory entries
+   recursively.  Else if DEPTH is svn_depth_files, list all files under
    PATH_OR_URL (if any), but not subdirectories.  Else if DEPTH is
    svn_depth_immediates, list all files and include immediate
    subdirectories (at svn_depth_empty).  Else if DEPTH is
    svn_depth_empty, just list PATH_OR_URL with none of its entries.
- 
+
    DIRENT_FIELDS controls which fields in the svn_dirent_t's are
    filled in.  To have them totally filled in use SVN_DIRENT_ALL,
    otherwise simply bitwise OR together the combination of SVN_DIRENT_*
    fields you care about.
- 
+
    If FETCH_LOCKS is TRUE, include locks when reporting directory entries.
- 
-   If INCLUDE_EXTERNALS is TRUE, also list all external items 
+
+   If INCLUDE_EXTERNALS is TRUE, also list all external items
    reached by recursion.  DEPTH value passed to the original list target
-   applies for the externals also.  EXTERNAL_PARENT_URL is url of the 
+   applies for the externals also.  EXTERNAL_PARENT_URL is url of the
    directory which has the externals definitions.  EXTERNAL_TARGET is the
    target subdirectory of externals definitions.
 
-   Report directory entries by invoking LIST_FUNC/BATON. 
+   Report directory entries by invoking LIST_FUNC/BATON.
    Pass EXTERNAL_PARENT_URL and EXTERNAL_TARGET to LIST_FUNC when external
    items are listed, otherwise both are set to NULL.
- 
+
    Use authentication baton cached in CTX to authenticate against the
    repository.
- 
+
    Use POOL for all allocations.
 */
 static svn_error_t *
@@ -400,9 +396,8 @@ list_internal(const char *path_or_url,
 
   /* Report the dirent for the target. */
   SVN_ERR(list_func(baton, "", dirent, locks
-                    ? (apr_hash_get(locks, fs_path,
-                                    APR_HASH_KEY_STRING))
-                    : NULL, fs_path, external_parent_url, 
+                    ? (svn_hash_gets(locks, fs_path))
+                    : NULL, fs_path, external_parent_url,
                     external_target, pool));
 
   if (dirent->kind == svn_node_dir
@@ -410,22 +405,22 @@ list_internal(const char *path_or_url,
           || depth == svn_depth_immediates
           || depth == svn_depth_infinity))
     SVN_ERR(get_dir_contents(dirent_fields, "", loc->rev, ra_session, locks,
-                             fs_path, depth, ctx, externals, 
+                             fs_path, depth, ctx, externals,
                              external_parent_url, external_target, list_func,
                              baton, pool, pool));
-  
+
   /* We handle externals after listing entries under path_or_url, so that
      handling external items (and any errors therefrom) doesn't delay
      the primary operation. */
   if (include_externals && apr_hash_count(externals))
     {
-      /* The 'externals' hash populated by get_dir_contents() is processed 
+      /* The 'externals' hash populated by get_dir_contents() is processed
          here. */
-      SVN_ERR(list_externals(externals, depth, dirent_fields, 
+      SVN_ERR(list_externals(externals, depth, dirent_fields,
                              fetch_locks, list_func, baton,
                              ctx, pool));
-    } 
-  
+    }
+
   return SVN_NO_ERROR;
 }
 
@@ -516,7 +511,7 @@ list_external_items(apr_array_header_t *
 /* List external items defined on each external in EXTERNALS, a const char *
    externals_parent_url(url of the directory which has the externals
    definitions) of all externals mapping to the svn_string_t * externals_desc
-   (externals description text). All other options are the same as those 
+   (externals description text). All other options are the same as those
    passed to svn_client_list(). */
 static svn_error_t *
 list_externals(apr_hash_t *externals,

Modified: subversion/branches/master-passphrase/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/libsvn_client/locking_commands.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/branches/master-passphrase/subversion/libsvn_client/locking_commands.c Fri May 10 14:58:47 2013
@@ -28,6 +28,7 @@
 /*** Includes. ***/
 
 #include "svn_client.h"
+#include "svn_hash.h"
 #include "client.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -88,8 +89,7 @@ store_locks_callback(void *baton,
 
   if (lb->base_dir_abspath)
     {
-      char *path = apr_hash_get(lb->urls_to_paths, rel_url,
-                                APR_HASH_KEY_STRING);
+      char *path = svn_hash_gets(lb->urls_to_paths, rel_url);
       const char *local_abspath;
 
       local_abspath = svn_dirent_join(lb->base_dir_abspath, path, pool);
@@ -271,11 +271,11 @@ organize_lock_targets(const char **commo
          lock token string (if the caller is unlocking). */
       for (i = 0; i < rel_targets->nelts; i++)
         {
-          apr_hash_set(rel_targets_ret,
-                       APR_ARRAY_IDX(rel_targets, i, const char *),
-                       APR_HASH_KEY_STRING,
-                       do_lock ? (const void *)invalid_revnum
-                               : (const void *)"");
+          svn_hash_sets(rel_targets_ret,
+                        APR_ARRAY_IDX(rel_targets, i, const char *),
+                        do_lock
+                        ? (const void *)invalid_revnum
+                        : (const void *)"");
         }
     }
   else
@@ -326,7 +326,7 @@ organize_lock_targets(const char **commo
                                      svn_dirent_local_style(local_abspath,
                                                             iterpool));
 
-          apr_hash_set(wc_info, local_abspath, APR_HASH_KEY_STRING, wli);
+          svn_hash_sets(wc_info, local_abspath, wli);
 
           target_url = svn_path_url_add_component2(repos_root_url,
                                                    repos_relpath,
@@ -359,8 +359,8 @@ organize_lock_targets(const char **commo
              COMMON_DIRENT). */
           rel_target = APR_ARRAY_IDX(rel_targets, i, const char *);
           rel_url = APR_ARRAY_IDX(rel_urls, i, const char *);
-          apr_hash_set(rel_fs_paths, rel_url, APR_HASH_KEY_STRING,
-                       apr_pstrdup(result_pool, rel_target));
+          svn_hash_sets(rel_fs_paths, rel_url,
+                        apr_pstrdup(result_pool, rel_target));
 
           /* Then, we map our REL_URL (again) to either the base
              revision of the dirent target with which it is associated
@@ -374,14 +374,13 @@ organize_lock_targets(const char **commo
               struct wc_lock_item_t *wli;
               revnum = apr_palloc(result_pool, sizeof(* revnum));
 
-              wli = apr_hash_get(wc_info, local_abspath, APR_HASH_KEY_STRING);
+              wli = svn_hash_gets(wc_info, local_abspath);
 
               SVN_ERR_ASSERT(wli != NULL);
 
               *revnum = wli->revision;
 
-              apr_hash_set(rel_targets_ret, rel_url,
-                           APR_HASH_KEY_STRING, revnum);
+              svn_hash_sets(rel_targets_ret, rel_url, revnum);
             }
           else /* Unlock. */
             {
@@ -391,8 +390,7 @@ organize_lock_targets(const char **commo
               /* If not forcing the unlock, get the lock token. */
               if (! force)
                 {
-                  wli = apr_hash_get(wc_info, local_abspath,
-                                     APR_HASH_KEY_STRING);
+                  wli = svn_hash_gets(wc_info, local_abspath);
 
                   SVN_ERR_ASSERT(wli != NULL);
 
@@ -411,8 +409,8 @@ organize_lock_targets(const char **commo
                 lock_token = NULL;
 
               /* If breaking a lock, we shouldn't pass any lock token. */
-              apr_hash_set(rel_targets_ret, rel_url, APR_HASH_KEY_STRING,
-                           lock_token ? lock_token : "");
+              svn_hash_sets(rel_targets_ret, rel_url,
+                            lock_token ? lock_token : "");
             }
         }
 
@@ -451,8 +449,7 @@ fetch_tokens(svn_ra_session_t *ra_sessio
           (SVN_ERR_CLIENT_MISSING_LOCK_TOKEN, NULL,
            _("'%s' is not locked"), path);
 
-      apr_hash_set(path_tokens, path, APR_HASH_KEY_STRING,
-                   apr_pstrdup(pool, lock->token));
+      svn_hash_sets(path_tokens, path, apr_pstrdup(pool, lock->token));
     }
 
   svn_pool_destroy(iterpool);



Mime
View raw message