You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/30 21:02:33 UTC

svn commit: r1462850 [5/14] - in /subversion/branches/fsfs-format7: ./ build/ build/ac-macros/ build/generator/ contrib/client-side/svncopy/ notes/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversi...

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/ra.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/ra.c Sat Mar 30 20:02:27 2013
@@ -26,6 +26,7 @@
 #include <apr_pools.h>
 
 #include "svn_error.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_string.h"
 #include "svn_sorts.h"
@@ -409,13 +410,13 @@ svn_client__open_ra_session_internal(svn
           *corrected_url = corrected;
 
           /* Make sure we've not attempted this URL before. */
-          if (apr_hash_get(attempted, corrected, APR_HASH_KEY_STRING))
+          if (svn_hash_gets(attempted, corrected))
             return svn_error_createf(SVN_ERR_CLIENT_CYCLE_DETECTED, NULL,
                                      _("Redirect cycle detected for URL '%s'"),
                                      corrected);
 
           /* Remember this CORRECTED_URL so we don't wind up in a loop. */
-          apr_hash_set(attempted, corrected, APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(attempted, corrected, (void *)1);
           base_url = corrected;
         }
     }
@@ -1052,8 +1053,7 @@ svn_client__ra_provide_base(svn_stream_t
   const char *local_abspath;
   svn_error_t *err;
 
-  local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
-                               APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
   if (!local_abspath)
     {
       *contents = NULL;
@@ -1097,8 +1097,7 @@ svn_client__ra_provide_props(apr_hash_t 
   const char *local_abspath;
   svn_error_t *err;
 
-  local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
-                               APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
   if (!local_abspath)
     {
       *props = NULL;
@@ -1131,29 +1130,26 @@ svn_client__ra_provide_props(apr_hash_t 
 
 
 svn_error_t *
-svn_client__ra_get_copysrc_kind(svn_kind_t *kind,
+svn_client__ra_get_copysrc_kind(svn_node_kind_t *kind,
                                 void *baton,
                                 const char *repos_relpath,
                                 svn_revnum_t src_revision,
                                 apr_pool_t *scratch_pool)
 {
   struct ra_ev2_baton *reb = baton;
-  svn_node_kind_t node_kind;
   const char *local_abspath;
 
-  local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
-                               APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
   if (!local_abspath)
     {
-      *kind = svn_kind_unknown;
+      *kind = svn_node_unknown;
       return SVN_NO_ERROR;
     }
 
   /* ### what to do with SRC_REVISION?  */
 
-  SVN_ERR(svn_wc_read_kind2(&node_kind, reb->wc_ctx, local_abspath,
+  SVN_ERR(svn_wc_read_kind2(kind, reb->wc_ctx, local_abspath,
                             FALSE, FALSE, scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/repos_diff.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/repos_diff.c Sat Mar 30 20:02:27 2013
@@ -395,9 +395,8 @@ remove_non_prop_changes(apr_hash_t *pris
 
       if (change->value)
         {
-          const svn_string_t *old_val = apr_hash_get(pristine_props,
-                                                     change->name,
-                                                     APR_HASH_KEY_STRING);
+          const svn_string_t *old_val = svn_hash_gets(pristine_props,
+                                                      change->name);
 
           if (old_val && svn_string_compare(old_val, change->value))
             {
@@ -1213,22 +1212,20 @@ absent_file(const char *path,
 }
 
 static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
+fetch_kind_func(svn_node_kind_t *kind,
                 void *baton,
                 const char *path,
                 svn_revnum_t base_revision,
                 apr_pool_t *scratch_pool)
 {
   struct edit_baton *eb = baton;
-  svn_node_kind_t node_kind;
 
   if (!SVN_IS_VALID_REVNUM(base_revision))
     base_revision = eb->revision;
 
-  SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, &node_kind,
+  SVN_ERR(svn_ra_check_path(eb->ra_session, path, base_revision, kind,
                             scratch_pool));
 
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/resolved.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/resolved.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/resolved.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/resolved.c Sat Mar 30 20:02:27 2013
@@ -27,12 +27,17 @@
 
 /*** Includes. ***/
 
+#include <stdlib.h>
+
 #include "svn_types.h"
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
+#include "svn_pools.h"
+#include "svn_hash.h"
+#include "svn_sorts.h"
 #include "client.h"
 #include "private/svn_wc_private.h"
 
@@ -41,6 +46,66 @@
 /*** Code. ***/
 
 svn_error_t *
+svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain,
+                              apr_hash_t *conflicted_paths,
+                              svn_client_ctx_t *ctx,
+                              apr_pool_t *scratch_pool)
+{
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  apr_array_header_t *array;
+  int i;
+
+  if (conflicts_remain)
+    *conflicts_remain = FALSE;
+
+  SVN_ERR(svn_hash_keys(&array, conflicted_paths, scratch_pool));
+  qsort(array->elts, array->nelts, array->elt_size,
+        svn_sort_compare_paths);
+
+  for (i = 0; i < array->nelts; i++)
+    {
+      const char *local_abspath = APR_ARRAY_IDX(array, i, const char *);
+
+      svn_pool_clear(iterpool);
+      SVN_ERR(svn_wc__resolve_conflicts(ctx->wc_ctx, local_abspath,
+                                        svn_depth_empty,
+                                        TRUE /* resolve_text */,
+                                        "" /* resolve_prop (ALL props) */,
+                                        TRUE /* resolve_tree */,
+                                        svn_wc_conflict_choose_unspecified,
+                                        ctx->conflict_func2,
+                                        ctx->conflict_baton2,
+                                        ctx->cancel_func, ctx->cancel_baton,
+                                        ctx->notify_func2, ctx->notify_baton2,
+                                        iterpool));
+
+      if (conflicts_remain)
+        {
+          svn_error_t *err;
+          svn_boolean_t text_c, prop_c, tree_c;
+
+          err = svn_wc_conflicted_p3(&text_c, &prop_c, &tree_c,
+                                     ctx->wc_ctx, local_abspath,
+                                     iterpool);
+          if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+            {
+              svn_error_clear(err);
+              text_c = prop_c = tree_c = FALSE;
+            }
+          else
+            {
+              SVN_ERR(err);
+            }
+          if (text_c || prop_c || tree_c)
+            *conflicts_remain = TRUE;
+        }
+    }
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
 svn_client_resolve(const char *path,
                    svn_depth_t depth,
                    svn_wc_conflict_choice_t conflict_choice,
@@ -77,5 +142,7 @@ svn_client_resolve(const char *path,
   err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx,
                                                                  lock_abspath,
                                                                  pool));
+  svn_io_sleep_for_timestamps(path, pool);
+
   return svn_error_trace(err);
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/revert.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/revert.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/revert.c Sat Mar 30 20:02:27 2013
@@ -31,6 +31,7 @@
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_time.h"
@@ -135,8 +136,9 @@ svn_client_revert2(const apr_array_heade
                                  _("'%s' is not a local path"), path);
     }
 
-  cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
-                                   APR_HASH_KEY_STRING) : NULL;
+  cfg = ctx->config
+        ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+        : NULL;
 
   SVN_ERR(svn_config_get_bool(cfg, &use_commit_times,
                               SVN_CONFIG_SECTION_MISCELLANY,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/status.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/status.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/status.c Sat Mar 30 20:02:27 2013
@@ -87,8 +87,7 @@ tweak_status(void *baton,
      transmission.  */
   if (sb->changelist_hash
       && (! status->changelist
-          || ! apr_hash_get(sb->changelist_hash, status->changelist,
-                            APR_HASH_KEY_STRING)))
+          || ! svn_hash_gets(sb->changelist_hash, status->changelist)))
     {
       return SVN_NO_ERROR;
     }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/switch.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/switch.c Sat Mar 30 20:02:27 2013
@@ -29,6 +29,7 @@
 
 #include "svn_client.h"
 #include "svn_error.h"
+#include "svn_hash.h"
 #include "svn_time.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -55,8 +56,35 @@
 */
 
 
+/* A conflict callback that simply records the conflicted path in BATON.
+
+   Implements svn_wc_conflict_resolver_func2_t.
+*/
+static svn_error_t *
+record_conflict(svn_wc_conflict_result_t **result,
+                const svn_wc_conflict_description2_t *description,
+                void *baton,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
+{
+  apr_hash_t *conflicted_paths = baton;
+
+  svn_hash_sets(conflicted_paths,
+                apr_pstrdup(apr_hash_pool_get(conflicted_paths),
+                            description->local_abspath), "");
+  *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
+                                          NULL, result_pool);
+  return SVN_NO_ERROR;
+}
+
+/* ...
+
+   Add the paths of any conflict victims to CONFLICTED_PATHS, if that
+   is not null.
+*/
 static svn_error_t *
 switch_internal(svn_revnum_t *result_rev,
+                apr_hash_t *conflicted_paths,
                 const char *local_abspath,
                 const char *anchor_abspath,
                 const char *switch_url,
@@ -90,10 +118,9 @@ switch_internal(svn_revnum_t *result_rev
   apr_array_header_t *preserved_exts;
   svn_boolean_t server_supports_depth;
   struct svn_client__dirent_fetcher_baton_t dfb;
-  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;
 
   /* An unknown depth can't be sticky. */
   if (depth == svn_depth_unknown)
@@ -269,8 +296,7 @@ switch_internal(svn_revnum_t *result_rev
           SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
                                              "", switch_loc->rev, pool,
                                              pool));
-          apr_hash_set(wcroot_iprops, local_abspath, APR_HASH_KEY_STRING,
-                       inherited_props);
+          svn_hash_sets(wcroot_iprops, local_abspath, inherited_props);
         }
     }
 
@@ -293,7 +319,8 @@ switch_internal(svn_revnum_t *result_rev
                                     server_supports_depth,
                                     diff3_cmd, preserved_exts,
                                     svn_client__dirent_fetcher, &dfb,
-                                    ctx->conflict_func2, ctx->conflict_baton2,
+                                    conflicted_paths ? record_conflict : NULL,
+                                    conflicted_paths,
                                     NULL, NULL,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     ctx->notify_func2, ctx->notify_baton2,
@@ -398,6 +425,8 @@ svn_client__switch_internal(svn_revnum_t
   const char *local_abspath, *anchor_abspath;
   svn_boolean_t acquired_lock;
   svn_error_t *err, *err1, *err2;
+  apr_hash_t *conflicted_paths
+    = ctx->conflict_func2 ? apr_hash_make(pool) : NULL;
 
   SVN_ERR_ASSERT(path);
 
@@ -414,13 +443,21 @@ svn_client__switch_internal(svn_revnum_t
   acquired_lock = (err == SVN_NO_ERROR);
   svn_error_clear(err);
 
-  err1 = switch_internal(result_rev, local_abspath, anchor_abspath,
+  err1 = switch_internal(result_rev, conflicted_paths,
+                         local_abspath, anchor_abspath,
                          switch_url, peg_revision, revision,
                          depth, depth_is_sticky,
                          ignore_externals,
                          allow_unver_obstructions, ignore_ancestry,
                          timestamp_sleep, ctx, pool);
 
+  /* Give the conflict resolver callback the opportunity to
+   * resolve any conflicts that were raised. */
+  if (! err1 && ctx->conflict_func2)
+    {
+      err1 = svn_client__resolve_conflicts(NULL, conflicted_paths, ctx, pool);
+    }
+
   if (acquired_lock)
     err2 = svn_wc__release_write_lock(ctx->wc_ctx, anchor_abspath, pool);
   else

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/update.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/update.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/update.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_hash.h"
 #include "svn_wc.h"
 #include "svn_client.h"
 #include "svn_error.h"
@@ -160,6 +161,27 @@ is_empty_wc(svn_boolean_t *clean_checkou
   return svn_io_dir_close(dir);
 }
 
+/* A conflict callback that simply records the conflicted path in BATON.
+
+   Implements svn_wc_conflict_resolver_func2_t.
+*/
+static svn_error_t *
+record_conflict(svn_wc_conflict_result_t **result,
+                const svn_wc_conflict_description2_t *description,
+                void *baton,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
+{
+  apr_hash_t *conflicted_paths = baton;
+
+  svn_hash_sets(conflicted_paths,
+                apr_pstrdup(apr_hash_pool_get(conflicted_paths),
+                            description->local_abspath), "");
+  *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
+                                          NULL, result_pool);
+  return SVN_NO_ERROR;
+}
+
 /* This is a helper for svn_client__update_internal(), which see for
    an explanation of most of these parameters.  Some stuff that's
    unique is as follows:
@@ -171,9 +193,13 @@ is_empty_wc(svn_boolean_t *clean_checkou
    If NOTIFY_SUMMARY is set (and there's a notification handler in
    CTX), transmit the final update summary upon successful
    completion of the update.
+
+   Add the paths of any conflict victims to CONFLICTED_PATHS, if that
+   is not null.
 */
 static svn_error_t *
 update_internal(svn_revnum_t *result_rev,
+                apr_hash_t *conflicted_paths,
                 const char *local_abspath,
                 const char *anchor_abspath,
                 const svn_opt_revision_t *revision,
@@ -213,9 +239,9 @@ update_internal(svn_revnum_t *result_rev
   svn_boolean_t server_supports_depth;
   svn_boolean_t cropping_target;
   svn_boolean_t target_conflicted = FALSE;
-  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;
 
   if (result_rev)
     *result_rev = SVN_INVALID_REVNUM;
@@ -407,7 +433,8 @@ update_internal(svn_revnum_t *result_rev
                                     clean_checkout,
                                     diff3_cmd, preserved_exts,
                                     svn_client__dirent_fetcher, &dfb,
-                                    ctx->conflict_func2, ctx->conflict_baton2,
+                                    conflicted_paths ? record_conflict : NULL,
+                                    conflicted_paths,
                                     NULL, NULL,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     ctx->notify_func2, ctx->notify_baton2,
@@ -504,6 +531,8 @@ svn_client__update_internal(svn_revnum_t
   const char *anchor_abspath, *lockroot_abspath;
   svn_error_t *err;
   svn_opt_revision_t peg_revision = *revision;
+  apr_hash_t *conflicted_paths
+    = ctx->conflict_func2 ? apr_hash_make(pool) : NULL;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
   SVN_ERR_ASSERT(! (innerupdate && make_parents));
@@ -544,7 +573,9 @@ svn_client__update_internal(svn_revnum_t
         {
           const char *missing_parent =
             APR_ARRAY_IDX(missing_parents, i, const char *);
-          err = update_internal(result_rev, missing_parent, anchor_abspath,
+
+          err = update_internal(result_rev, conflicted_paths,
+                                missing_parent, anchor_abspath,
                                 &peg_revision, svn_depth_empty, FALSE,
                                 ignore_externals, allow_unver_obstructions,
                                 adds_as_modification, timestamp_sleep,
@@ -568,11 +599,20 @@ svn_client__update_internal(svn_revnum_t
       anchor_abspath = lockroot_abspath;
     }
 
-  err = update_internal(result_rev, local_abspath, anchor_abspath,
+  err = update_internal(result_rev, conflicted_paths,
+                        local_abspath, anchor_abspath,
                         &peg_revision, depth, depth_is_sticky,
                         ignore_externals, allow_unver_obstructions,
                         adds_as_modification, timestamp_sleep,
                         TRUE, ctx, pool);
+
+  /* Give the conflict resolver callback the opportunity to
+   * resolve any conflicts that were raised. */
+  if (! err && ctx->conflict_func2)
+    {
+      err = svn_client__resolve_conflicts(NULL, conflicted_paths, ctx, pool);
+    }
+
  cleanup:
   err = svn_error_compose_create(
             err,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/util.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/util.c Sat Mar 30 20:02:27 2013
@@ -24,6 +24,7 @@
 #include <apr_pools.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_types.h"
@@ -349,7 +350,7 @@ fetch_props_func(apr_hash_t **props,
   struct shim_callbacks_baton *scb = baton;
   const char *local_abspath;
 
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(scb->relpath_map, path);
   if (!local_abspath)
     {
       *props = apr_hash_make(result_pool);
@@ -367,26 +368,24 @@ fetch_props_func(apr_hash_t **props,
 }
 
 static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
+fetch_kind_func(svn_node_kind_t *kind,
                 void *baton,
                 const char *path,
                 svn_revnum_t base_revision,
                 apr_pool_t *scratch_pool)
 {
   struct shim_callbacks_baton *scb = baton;
-  svn_node_kind_t node_kind;
   const char *local_abspath;
 
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(scb->relpath_map, path);
   if (!local_abspath)
     {
-      *kind = svn_kind_unknown;
+      *kind = svn_node_unknown;
       return SVN_NO_ERROR;
     }
   /* Reads the WORKING kind. Not the BASE kind */
-  SVN_ERR(svn_wc_read_kind2(&node_kind, scb->wc_ctx, local_abspath,
+  SVN_ERR(svn_wc_read_kind2(kind, scb->wc_ctx, local_abspath,
                             TRUE, FALSE, scratch_pool));
-  *kind = svn__kind_from_node_kind(node_kind, FALSE);
 
   return SVN_NO_ERROR;
 }
@@ -405,7 +404,7 @@ fetch_base_func(const char **filename,
   svn_stream_t *temp_stream;
   svn_error_t *err;
 
-  local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+  local_abspath = svn_hash_gets(scb->relpath_map, path);
   if (!local_abspath)
     {
       *filename = NULL;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c Sat Mar 30 20:02:27 2013
@@ -172,7 +172,7 @@ struct change_node
   /* what kind of (tree) restructure is occurring at this node?  */
   enum restructure_action_t action;
 
-  svn_kind_t kind;  /* the NEW kind of this node  */
+  svn_node_kind_t kind;  /* the NEW kind of this node  */
 
   /* We need two revisions: one to specify the revision we are altering,
      and a second to specify the revision to delete/replace. These are
@@ -205,8 +205,7 @@ static struct change_node *
 locate_change(struct ev2_edit_baton *eb,
               const char *relpath)
 {
-  struct change_node *change = apr_hash_get(eb->changes, relpath,
-                                            APR_HASH_KEY_STRING);
+  struct change_node *change = svn_hash_gets(eb->changes, relpath);
 
   if (change != NULL)
     return change;
@@ -220,7 +219,7 @@ locate_change(struct ev2_edit_baton *eb,
   change->changing = SVN_INVALID_REVNUM;
   change->deleting = SVN_INVALID_REVNUM;
 
-  apr_hash_set(eb->changes, relpath, APR_HASH_KEY_STRING, change);
+  svn_hash_sets(eb->changes, relpath, change);
 
   return change;
 }
@@ -229,7 +228,7 @@ locate_change(struct ev2_edit_baton *eb,
 static svn_error_t *
 apply_propedit(struct ev2_edit_baton *eb,
                const char *relpath,
-               svn_kind_t kind,
+               svn_node_kind_t kind,
                svn_revnum_t base_revision,
                const char *name,
                const svn_string_t *value,
@@ -237,7 +236,7 @@ apply_propedit(struct ev2_edit_baton *eb
 {
   struct change_node *change = locate_change(eb, relpath);
 
-  SVN_ERR_ASSERT(change->kind == svn_kind_unknown || change->kind == kind);
+  SVN_ERR_ASSERT(change->kind == svn_node_unknown || change->kind == kind);
   change->kind = kind;
 
   /* We're now changing the node. Record the revision.  */
@@ -270,11 +269,11 @@ apply_propedit(struct ev2_edit_baton *eb
     }
 
   if (value == NULL)
-    apr_hash_set(change->props, name, APR_HASH_KEY_STRING, NULL);
+    svn_hash_sets(change->props, name, NULL);
   else
-    apr_hash_set(change->props,
-                 apr_pstrdup(eb->edit_pool, name), APR_HASH_KEY_STRING,
-                 svn_string_dup(value, eb->edit_pool));
+    svn_hash_sets(change->props,
+                  apr_pstrdup(eb->edit_pool, name),
+                  svn_string_dup(value, eb->edit_pool));
 
   return SVN_NO_ERROR;
 }
@@ -321,7 +320,7 @@ process_actions(struct ev2_edit_baton *e
   apr_hash_t *props = NULL;
   svn_stream_t *contents = NULL;
   svn_checksum_t *checksum = NULL;
-  svn_kind_t kind = svn_kind_unknown;
+  svn_node_kind_t kind = svn_node_unknown;
 
   SVN_ERR_ASSERT(change != NULL);
 
@@ -351,7 +350,7 @@ process_actions(struct ev2_edit_baton *e
     {
       /* We can only set text on files. */
       /* ### validate we aren't overwriting KIND?  */
-      kind = svn_kind_file;
+      kind = svn_node_file;
 
       /* ### the checksum might be in CHANGE->CHECKSUM  */
       SVN_ERR(svn_io_file_checksum2(&checksum, change->contents_abspath,
@@ -387,7 +386,7 @@ process_actions(struct ev2_edit_baton *e
           if (props == NULL)
             props = apr_hash_make(scratch_pool);
 
-          if (kind == svn_kind_dir)
+          if (kind == svn_node_dir)
             {
               const apr_array_header_t *children;
 
@@ -435,7 +434,7 @@ process_actions(struct ev2_edit_baton *e
 
       /* ### we need to gather up the target set of children  */
 
-      if (kind == svn_kind_dir)
+      if (kind == svn_node_dir)
         SVN_ERR(svn_editor_alter_directory(eb->editor, repos_relpath,
                                            change->changing, NULL, props));
       else
@@ -462,9 +461,8 @@ run_ev2_actions(struct ev2_edit_baton *e
       const char *repos_relpath = APR_ARRAY_IDX(eb->path_order,
                                                 eb->paths_processed,
                                                 const char *);
-      const struct change_node *change = apr_hash_get(eb->changes,
-                                                      repos_relpath,
-                                                      APR_HASH_KEY_STRING);
+      const struct change_node *change = svn_hash_gets(eb->changes,
+                                                       repos_relpath);
 
       svn_pool_clear(iterpool);
 
@@ -573,7 +571,7 @@ ev2_add_directory(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
 
   cb->eb = pb->eb;
   cb->path = apr_pstrdup(result_pool, relpath);
@@ -644,7 +642,7 @@ ev2_change_dir_prop(void *dir_baton,
 {
   struct ev2_dir_baton *db = dir_baton;
 
-  SVN_ERR(apply_propedit(db->eb, db->path, svn_kind_dir, db->base_revision,
+  SVN_ERR(apply_propedit(db->eb, db->path, svn_node_dir, db->base_revision,
                          name, value, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -668,7 +666,7 @@ ev2_absent_directory(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD_ABSENT;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
 
   return SVN_NO_ERROR;
 }
@@ -690,7 +688,7 @@ ev2_add_file(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
 
   fb->eb = pb->eb;
   fb->path = apr_pstrdup(result_pool, relpath);
@@ -856,7 +854,7 @@ ev2_change_file_prop(void *file_baton,
       change->unlock = TRUE;
     }
 
-  SVN_ERR(apply_propedit(fb->eb, fb->path, svn_kind_file, fb->base_revision,
+  SVN_ERR(apply_propedit(fb->eb, fb->path, svn_node_file, fb->base_revision,
                          name, value, scratch_pool));
 
   return SVN_NO_ERROR;
@@ -881,7 +879,7 @@ ev2_absent_file(const char *path,
 
   /* ### assert that RESTRUCTURE is NONE or DELETE?  */
   change->action = RESTRUCTURE_ADD_ABSENT;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
 
   return SVN_NO_ERROR;
 }
@@ -1037,7 +1035,7 @@ insert_change(const char *relpath,
   apr_pool_t *result_pool;
   struct change_node *change;
 
-  change = apr_hash_get(changes, relpath, APR_HASH_KEY_STRING);
+  change = svn_hash_gets(changes, relpath);
   if (change != NULL)
     return change;
 
@@ -1048,9 +1046,7 @@ insert_change(const char *relpath,
   change->changing = SVN_INVALID_REVNUM;
   change->deleting = SVN_INVALID_REVNUM;
 
-  apr_hash_set(changes,
-               apr_pstrdup(result_pool, relpath), APR_HASH_KEY_STRING,
-               change);
+  svn_hash_sets(changes, apr_pstrdup(result_pool, relpath), change);
 
   return change;
 }
@@ -1069,7 +1065,7 @@ add_directory_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
@@ -1106,7 +1102,7 @@ add_file_cb(void *baton,
   SVN_ERR(svn_stream_copy3(contents, tmp_stream, NULL, NULL, scratch_pool));
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
   change->contents_abspath = tmp_filename;
@@ -1129,7 +1125,7 @@ add_symlink_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  change->kind = svn_kind_symlink;
+  change->kind = svn_node_symlink;
   change->deleting = replaces_rev;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
   /* ### target  */
@@ -1142,7 +1138,7 @@ add_symlink_cb(void *baton,
 static svn_error_t *
 add_absent_cb(void *baton,
               const char *relpath,
-              svn_kind_t kind,
+              svn_node_kind_t kind,
               svn_revnum_t replaces_rev,
               apr_pool_t *scratch_pool)
 {
@@ -1174,7 +1170,7 @@ alter_directory_cb(void *baton,
 
   /* Note: this node may already have information in CHANGE as a result
      of an earlier copy/move operation.  */
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   change->changing = revision;
   change->props = svn_prop_hash_dup(props, eb->edit_pool);
 
@@ -1220,7 +1216,7 @@ alter_file_cb(void *baton,
   /* Note: this node may already have information in CHANGE as a result
      of an earlier copy/move operation.  */
 
-  change->kind = svn_kind_file;
+  change->kind = svn_node_file;
   change->changing = revision;
   if (props != NULL)
     change->props = svn_prop_hash_dup(props, eb->edit_pool);
@@ -1260,7 +1256,7 @@ delete_cb(void *baton,
   struct change_node *change = insert_change(relpath, eb->changes);
 
   change->action = RESTRUCTURE_DELETE;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = revision;
 
   return SVN_NO_ERROR;
@@ -1279,7 +1275,7 @@ copy_cb(void *baton,
   struct change_node *change = insert_change(dst_relpath, eb->changes);
 
   change->action = RESTRUCTURE_ADD;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = replaces_rev;
   change->copyfrom_path = apr_pstrdup(eb->edit_pool, src_relpath);
   change->copyfrom_rev = src_revision;
@@ -1312,12 +1308,12 @@ move_cb(void *baton,
 
   change = insert_change(src_relpath, eb->changes);
   change->action = RESTRUCTURE_DELETE;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = src_revision;
 
   change = insert_change(dst_relpath, eb->changes);
   change->action = RESTRUCTURE_ADD;
-  /* change->kind = svn_kind_unknown;  */
+  /* change->kind = svn_node_unknown;  */
   change->deleting = replaces_rev;
   change->copyfrom_path = apr_pstrdup(eb->edit_pool, src_relpath);
   change->copyfrom_rev = src_revision;
@@ -1531,7 +1527,7 @@ drive_ev1_props(const struct editor_bato
 
       svn_pool_clear(iterpool);
 
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->change_dir_prop(node_baton,
                                              prop->name, prop->value,
                                              iterpool));
@@ -1544,7 +1540,7 @@ drive_ev1_props(const struct editor_bato
   /* Handle the funky unlock protocol. Note: only possibly on files.  */
   if (change->unlock)
     {
-      SVN_ERR_ASSERT(change->kind == svn_kind_file);
+      SVN_ERR_ASSERT(change->kind == svn_node_file);
       SVN_ERR(eb->deditor->change_file_prop(node_baton,
                                             SVN_PROP_ENTRY_LOCK_TOKEN, NULL,
                                             iterpool));
@@ -1574,7 +1570,7 @@ apply_change(void **dir_baton,
   *dir_baton = NULL;
 
   relpath = svn_relpath_join(eb->base_relpath, ev1_relpath, scratch_pool);
-  change = apr_hash_get(eb->changes, relpath, APR_HASH_KEY_STRING);
+  change = svn_hash_gets(eb->changes, relpath);
 
   /* The callback should only be called for paths in CHANGES.  */
   SVN_ERR_ASSERT(change != NULL);
@@ -1603,11 +1599,11 @@ apply_change(void **dir_baton,
     }
 
   /* If we're not deleting this node, then we should know its kind.  */
-  SVN_ERR_ASSERT(change->kind != svn_kind_unknown);
+  SVN_ERR_ASSERT(change->kind != svn_node_unknown);
 
   if (change->action == RESTRUCTURE_ADD_ABSENT)
     {
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->absent_directory(ev1_relpath, parent_baton,
                                               scratch_pool));
       else
@@ -1646,7 +1642,7 @@ apply_change(void **dir_baton,
           copyfrom_rev = change->copyfrom_rev;
         }
 
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->add_directory(ev1_relpath, parent_baton,
                                            copyfrom_url, copyfrom_rev,
                                            result_pool, dir_baton));
@@ -1657,7 +1653,7 @@ apply_change(void **dir_baton,
     }
   else
     {
-      if (change->kind == svn_kind_dir)
+      if (change->kind == svn_node_dir)
         SVN_ERR(eb->deditor->open_directory(ev1_relpath, parent_baton,
                                             change->changing,
                                             result_pool, dir_baton));
@@ -1668,7 +1664,7 @@ apply_change(void **dir_baton,
     }
 
   /* Apply any properties in CHANGE to the node.  */
-  if (change->kind == svn_kind_dir)
+  if (change->kind == svn_node_dir)
     SVN_ERR(drive_ev1_props(eb, relpath, change, *dir_baton, scratch_pool));
   else
     SVN_ERR(drive_ev1_props(eb, relpath, change, file_baton, scratch_pool));
@@ -1720,7 +1716,7 @@ drive_changes(const struct editor_baton 
      did in start_edit_func(). We can forge up a change record, if one
      does not already exist.  */
   change = insert_change(eb->base_relpath, eb->changes);
-  change->kind = svn_kind_dir;
+  change->kind = svn_node_dir;
   /* No property changes (tho they might exist from a real change).  */
 
   /* Get a sorted list of Ev1-relative paths.  */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_delta/editor.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_delta/editor.c Sat Mar 30 20:02:27 2013
@@ -110,19 +110,16 @@ static const int marker_added_dir = 0;
 #define SHOULD_NOT_BE_FINISHED(editor)  SVN_ERR_ASSERT(!(editor)->finished)
 
 #define CLEAR_INCOMPLETE(editor, relpath) \
-  apr_hash_set((editor)->pending_incomplete_children, relpath,  \
-               APR_HASH_KEY_STRING, NULL);
+  svn_hash_sets((editor)->pending_incomplete_children, relpath, NULL);
 
 #define MARK_RELPATH(editor, relpath, value) \
-  apr_hash_set((editor)->completed_nodes, \
-               apr_pstrdup((editor)->state_pool, relpath), \
-               APR_HASH_KEY_STRING, value)
+  svn_hash_sets((editor)->completed_nodes, \
+                apr_pstrdup((editor)->state_pool, relpath), value)
 
 #define MARK_COMPLETED(editor, relpath) \
   MARK_RELPATH(editor, relpath, MARKER_DONE)
 #define SHOULD_NOT_BE_COMPLETED(editor, relpath) \
-  SVN_ERR_ASSERT(apr_hash_get((editor)->completed_nodes, relpath, \
-                              APR_HASH_KEY_STRING) == NULL)
+  SVN_ERR_ASSERT(svn_hash_gets((editor)->completed_nodes, relpath) == NULL)
 
 #define MARK_ALLOW_ADD(editor, relpath) \
   MARK_RELPATH(editor, relpath, MARKER_ALLOW_ADD)
@@ -148,10 +145,10 @@ static const int marker_added_dir = 0;
 /* If the parent is MARKER_ALLOW_ADD, then it has been moved-away, and we
    know it does not exist. All other cases: it might exist.  */
 #define VERIFY_PARENT_MAY_EXIST(editor, relpath) \
-  SVN_ERR_ASSERT(apr_hash_get((editor)->completed_nodes, \
-                              svn_relpath_dirname(relpath, \
-                                                  (editor)->scratch_pool), \
-                              APR_HASH_KEY_STRING) != MARKER_ALLOW_ADD)
+  SVN_ERR_ASSERT(svn_hash_gets((editor)->completed_nodes, \
+                               svn_relpath_dirname(relpath, \
+                                                   (editor)->scratch_pool)) \
+                 != MARKER_ALLOW_ADD)
 
 /* If the parent is MARKER_ADDED_DIR, then we should not be deleting
    children(*). If the parent is MARKER_ALLOW_ADD, then it has been
@@ -175,8 +172,7 @@ allow_either(const svn_editor_t *editor,
              const void *marker1,
              const void *marker2)
 {
-  void *value = apr_hash_get(editor->completed_nodes, relpath,
-                             APR_HASH_KEY_STRING);
+  void *value = svn_hash_gets(editor->completed_nodes, relpath);
   return value == marker1 || value == marker2;
 }
 
@@ -187,14 +183,13 @@ check_unknown_child(const svn_editor_t *
   const char *parent;
 
   /* If we already know about the new child, then exit early.  */
-  if (apr_hash_get(editor->pending_incomplete_children, relpath,
-                   APR_HASH_KEY_STRING) != NULL)
+  if (svn_hash_gets(editor->pending_incomplete_children, relpath) != NULL)
     return TRUE;
 
   parent = svn_relpath_dirname(relpath, editor->scratch_pool);
 
   /* Was this parent created via svn_editor_add_directory() ?  */
-  if (apr_hash_get(editor->completed_nodes, parent, APR_HASH_KEY_STRING)
+  if (svn_hash_gets(editor->completed_nodes, parent)
       == MARKER_ADDED_DIR)
     {
       /* Whoops. This child should have been listed in that add call,
@@ -211,8 +206,7 @@ mark_parent_stable(const svn_editor_t *e
                    const char *relpath)
 {
   const char *parent = svn_relpath_dirname(relpath, editor->scratch_pool);
-  const void *marker = apr_hash_get(editor->completed_nodes,
-                                    parent, APR_HASH_KEY_STRING);
+  const void *marker = svn_hash_gets(editor->completed_nodes, parent);
 
   /* If RELPATH has already been marked (to disallow adds, or that it
      has been fully-completed), then do nothing.  */
@@ -511,8 +505,7 @@ svn_editor_add_directory(svn_editor_t *e
         const char *child = svn_relpath_join(relpath, child_basename,
                                              editor->state_pool);
 
-        apr_hash_set(editor->pending_incomplete_children, child,
-                     APR_HASH_KEY_STRING, "");
+        svn_hash_sets(editor->pending_incomplete_children, child, "");
       }
   }
 #endif
@@ -600,7 +593,7 @@ svn_editor_add_symlink(svn_editor_t *edi
 svn_error_t *
 svn_editor_add_absent(svn_editor_t *editor,
                       const char *relpath,
-                      svn_kind_t kind,
+                      svn_node_kind_t kind,
                       svn_revnum_t replaces_rev)
 {
   svn_error_t *err = SVN_NO_ERROR;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_delta/xdelta.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_delta/xdelta.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_delta/xdelta.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_delta/xdelta.c Sat Mar 30 20:02:27 2013
@@ -27,6 +27,7 @@
 #include <apr_general.h>        /* for APR_INLINE */
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_delta.h"
 #include "private/svn_string_private.h"
 #include "delta.h"

Modified: subversion/branches/fsfs-format7/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_diff/diff_file.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_diff/diff_file.c Sat Mar 30 20:02:27 2013
@@ -544,6 +544,13 @@ find_identical_suffix(apr_off_t *suffix_
       file_for_suffix[i].chunk =
         (int) offset_to_chunk(file_for_suffix[i].size); /* last chunk */
       length[i] = offset_in_chunk(file_for_suffix[i].size);
+      if (length[i] == 0)
+        {
+          /* last chunk is an empty chunk -> start at next-to-last chunk */
+          file_for_suffix[i].chunk = file_for_suffix[i].chunk - 1;
+          length[i] = CHUNK_SIZE;
+        }
+
       if (file_for_suffix[i].chunk == file[i].chunk)
         {
           /* Prefix ended in last chunk, so we can reuse the prefix buffer */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_diff/parse-diff.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_diff/parse-diff.c Sat Mar 30 20:02:27 2013
@@ -25,6 +25,7 @@
 #include <stddef.h>
 #include <string.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_error.h"
 #include "svn_io.h"
@@ -1110,8 +1111,7 @@ add_property_hunk(svn_patch_t *patch, co
 {
   svn_prop_patch_t *prop_patch;
 
-  prop_patch = apr_hash_get(patch->prop_patches, prop_name,
-                            APR_HASH_KEY_STRING);
+  prop_patch = svn_hash_gets(patch->prop_patches, prop_name);
 
   if (! prop_patch)
     {
@@ -1121,8 +1121,7 @@ add_property_hunk(svn_patch_t *patch, co
       prop_patch->hunks = apr_array_make(result_pool, 1,
                                          sizeof(svn_diff_hunk_t *));
 
-      apr_hash_set(patch->prop_patches, prop_name, APR_HASH_KEY_STRING,
-                   prop_patch);
+      svn_hash_sets(patch->prop_patches, prop_name, prop_patch);
     }
 
   APR_ARRAY_PUSH(prop_patch->hunks, svn_diff_hunk_t *) = hunk;

Modified: subversion/branches/fsfs-format7/subversion/libsvn_diff/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_diff/util.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_diff/util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_diff/util.c Sat Mar 30 20:02:27 2013
@@ -25,6 +25,7 @@
 #include <apr.h>
 #include <apr_general.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
 #include "svn_props.h"
@@ -504,8 +505,7 @@ svn_diff__display_prop_diffs(svn_stream_
         = &APR_ARRAY_IDX(propchanges, i, svn_prop_t);
 
       if (original_props)
-        original_value = apr_hash_get(original_props,
-                                      propchange->name, APR_HASH_KEY_STRING);
+        original_value = svn_hash_gets(original_props, propchange->name);
       else
         original_value = NULL;
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs/access.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs/access.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs/access.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs/access.c Sat Mar 30 20:02:27 2013
@@ -24,6 +24,7 @@
 
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 #include "svn_fs.h"
@@ -86,8 +87,7 @@ svn_fs_access_add_lock_token2(svn_fs_acc
                               const char *path,
                               const char *token)
 {
-  apr_hash_set(access_ctx->lock_tokens,
-               token, APR_HASH_KEY_STRING, path);
+  svn_hash_sets(access_ctx->lock_tokens, token, path);
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs/editor.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs/editor.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs/editor.c Sat Mar 30 20:02:27 2013
@@ -28,6 +28,7 @@
 #include "svn_pools.h"
 #include "svn_fs.h"
 #include "svn_props.h"
+#include "svn_path.h"
 
 #include "svn_private_config.h"
 
@@ -443,7 +444,7 @@ add_symlink_cb(void *baton,
 static svn_error_t *
 add_absent_cb(void *baton,
               const char *relpath,
-              svn_kind_t kind,
+              svn_node_kind_t kind,
               svn_revnum_t replaces_rev,
               apr_pool_t *scratch_pool)
 {

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.c Sat Mar 30 20:02:27 2013
@@ -30,6 +30,7 @@
 #include <apr_uuid.h>
 #include <apr_strings.h>
 
+#include "svn_hash.h"
 #include "svn_ctype.h"
 #include "svn_types.h"
 #include "svn_dso.h"
@@ -48,7 +49,6 @@
 #include "private/svn_subr_private.h"
 
 #include "fs-loader.h"
-#include "svn_hash.h"
 
 /* This is defined by configure on platforms which use configure, but
    we need to define a fallback for Windows. */
@@ -451,6 +451,8 @@ svn_fs_create(svn_fs_t **fs_p, const cha
 
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
                        vtable->create(*fs_p, path, pool, common_pool));
+  SVN_ERR(vtable->set_svn_fs_open(*fs_p, svn_fs_open));
+
   return SVN_NO_ERROR;
 }
 
@@ -464,6 +466,8 @@ svn_fs_open(svn_fs_t **fs_p, const char 
   *fs_p = fs_new(fs_config, pool);
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
                        vtable->open_fs(*fs_p, path, pool, common_pool));
+  SVN_ERR(vtable->set_svn_fs_open(*fs_p, svn_fs_open));
+
   return SVN_NO_ERROR;
 }
 
@@ -629,11 +633,11 @@ svn_fs_recover(const char *path,
 }
 
 svn_error_t *
-svn_fs_verify_rev(svn_fs_t *fs,
-                  svn_revnum_t revision,
-                  apr_pool_t *scratch_pool)
+svn_fs_verify_root(svn_fs_root_t *root,
+                   apr_pool_t *scratch_pool)
 {
-  SVN_ERR(fs->vtable->verify_rev(fs, revision, scratch_pool));
+  svn_fs_t *fs = root->fs;
+  SVN_ERR(fs->vtable->verify_root(root, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -666,6 +670,8 @@ svn_fs_create_berkeley(svn_fs_t *fs, con
   /* Perform the actual creation. */
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
                        vtable->create(fs, path, fs->pool, common_pool));
+  SVN_ERR(vtable->set_svn_fs_open(fs, svn_fs_open));
+
   return SVN_NO_ERROR;
 }
 
@@ -677,6 +683,8 @@ svn_fs_open_berkeley(svn_fs_t *fs, const
   SVN_ERR(fs_library_vtable(&vtable, path, fs->pool));
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
                        vtable->open_fs(fs, path, fs->pool, common_pool));
+  SVN_ERR(vtable->set_svn_fs_open(fs, svn_fs_open));
+
   return SVN_NO_ERROR;
 }
 
@@ -750,16 +758,10 @@ svn_fs_commit_txn(const char **conflict_
                   svn_fs_txn_t *txn, apr_pool_t *pool)
 {
   svn_error_t *err;
-#ifdef PACK_AFTER_EVERY_COMMIT
-  svn_fs_root_t *txn_root;
-  svn_fs_t *fs;
-  const char *fs_path;
 
   *new_rev = SVN_INVALID_REVNUM;
-  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-  fs = svn_fs_root_fs(txn_root);
-  fs_path = svn_fs_path(fs, pool);
-#endif
+  if (conflict_p)
+    *conflict_p = NULL;
 
   err = txn->vtable->commit(conflict_p, new_rev, txn, pool);
 
@@ -779,6 +781,8 @@ svn_fs_commit_txn(const char **conflict_
 
 #ifdef PACK_AFTER_EVERY_COMMIT
   {
+    svn_fs_t *fs = txn->fs;
+    const char *fs_path = svn_fs_path(fs, pool);
     err = svn_fs_pack(fs_path, NULL, NULL, NULL, NULL, pool);
     if (err && err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE)
       /* Pre-1.6 filesystem. */

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs/fs-loader.h Sat Mar 30 20:02:27 2013
@@ -124,6 +124,14 @@ typedef struct fs_library_vtable_t
      into the FS vtable. */
   svn_fs_id_t *(*parse_id)(const char *data, apr_size_t len,
                            apr_pool_t *pool);
+  /* Allow an FSAP to call svn_fs_open(), which is in a higher-level library
+     (libsvn_fs-1.so) and cannot easily be moved to libsvn_fs_util. */
+  svn_error_t *(*set_svn_fs_open)(svn_fs_t *fs,
+                                  svn_error_t *(*svn_fs_open_)(svn_fs_t **,
+                                                               const char *,
+                                                               apr_hash_t *,
+                                                               apr_pool_t *));
+
 } fs_library_vtable_t;
 
 /* This is the type of symbol an FS module defines to fetch the
@@ -204,9 +212,8 @@ typedef struct fs_vtable_t
                             svn_fs_get_locks_callback_t get_locks_func,
                             void *get_locks_baton,
                             apr_pool_t *pool);
-  svn_error_t *(*verify_rev)(svn_fs_t *fs,
-                             svn_revnum_t revision,
-                             apr_pool_t *pool);
+  svn_error_t *(*verify_root)(svn_fs_root_t *root,
+                              apr_pool_t *pool);
   svn_error_t *(*freeze)(svn_fs_t *fs,
                          svn_error_t *(*freeze_body)(void *, apr_pool_t *),
                          void *baton, apr_pool_t *pool);

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/changes-table.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/changes-table.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/changes-table.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/changes-table.c Sat Mar 30 20:02:27 2013
@@ -25,6 +25,7 @@
 #include <apr_hash.h>
 #include <apr_tables.h>
 
+#include "svn_hash.h"
 #include "svn_fs.h"
 #include "svn_pools.h"
 #include "svn_path.h"
@@ -132,7 +133,7 @@ fold_change(apr_hash_t *changes,
   svn_fs_path_change2_t *old_change, *new_change;
   const char *path;
 
-  if ((old_change = apr_hash_get(changes, change->path, APR_HASH_KEY_STRING)))
+  if ((old_change = svn_hash_gets(changes, change->path)))
     {
       /* This path already exists in the hash, so we have to merge
          this change into the already existing one. */
@@ -244,7 +245,7 @@ fold_change(apr_hash_t *changes,
     }
 
   /* Add (or update) this path. */
-  apr_hash_set(changes, path, APR_HASH_KEY_STRING, new_change);
+  svn_hash_sets(changes, path, new_change);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/env.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/env.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/env.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/bdb/env.c Sat Mar 30 20:02:27 2013
@@ -31,6 +31,7 @@
 #include <apr_strings.h>
 #include <apr_hash.h>
 
+#include "svn_hash.h"
 #include "svn_path.h"
 #include "svn_pools.h"
 #include "svn_utf.h"

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/dag.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/dag.c Sat Mar 30 20:02:27 2013
@@ -350,7 +350,7 @@ dir_entry_id_from_node(const svn_fs_id_t
 
   SVN_ERR(svn_fs_base__dag_dir_entries(&entries, parent, trail, pool));
   if (entries)
-    dirent = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+    dirent = svn_hash_gets(entries, name);
   else
     dirent = NULL;
 
@@ -421,7 +421,7 @@ set_entry(dag_node_t *parent,
     entries = apr_hash_make(pool);
 
   /* Now, add our new entry to the entries list. */
-  apr_hash_set(entries, name, APR_HASH_KEY_STRING, id);
+  svn_hash_sets(entries, name, id);
 
   /* Finally, replace the old entries list with the new one. */
   SVN_ERR(svn_fs_base__unparse_entries_skel(&entries_skel, entries,
@@ -910,7 +910,7 @@ svn_fs_base__dag_delete(dag_node_t *pare
 
   /* Find NAME in the ENTRIES skel.  */
   if (entries)
-    id = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+    id = svn_hash_gets(entries, name);
 
   /* If we never found ID in ENTRIES (perhaps because there are no
      ENTRIES, perhaps because ID just isn't in the existing ENTRIES
@@ -929,7 +929,7 @@ svn_fs_base__dag_delete(dag_node_t *pare
                                              trail, pool));
 
   /* Remove this entry from its parent's entries list. */
-  apr_hash_set(entries, name, APR_HASH_KEY_STRING, NULL);
+  svn_hash_sets(entries, name, NULL);
 
   /* Replace the old entries list with the new one. */
   {
@@ -1593,12 +1593,11 @@ svn_fs_base__dag_commit_txn(svn_revnum_t
   *new_rev = SVN_INVALID_REVNUM;
   SVN_ERR(svn_fs_bdb__put_rev(new_rev, fs, &revision, trail, pool));
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
     SVN_ERR(svn_fs_base__set_txn_prop
             (fs, txn_id, SVN_FS__PROP_TXN_CHECK_OOD, NULL, trail, pool));
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                   APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
     SVN_ERR(svn_fs_base__set_txn_prop
             (fs, txn_id, SVN_FS__PROP_TXN_CHECK_LOCKS, NULL, trail, pool));
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/fs.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/fs.c Sat Mar 30 20:02:27 2013
@@ -28,6 +28,7 @@
 #include <apr_pools.h>
 #include <apr_file_io.h>
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_fs.h"
 #include "svn_path.h"
@@ -446,9 +447,7 @@ bdb_write_config(svn_fs_t *fs)
 
       if (fs->config)
         {
-          value = apr_hash_get(fs->config,
-                               dbconfig_options[i].config_key,
-                               APR_HASH_KEY_STRING);
+          value = svn_hash_gets(fs->config, dbconfig_options[i].config_key);
         }
 
       SVN_ERR(svn_io_file_write_full(dbconfig_file,
@@ -472,9 +471,8 @@ bdb_write_config(svn_fs_t *fs)
 }
 
 static svn_error_t *
-base_bdb_verify_rev(svn_fs_t *fs,
-                    svn_revnum_t revision,
-                    apr_pool_t *scratch_pool)
+base_bdb_verify_root(svn_fs_root_t *root,
+                     apr_pool_t *scratch_pool)
 {
   /* Verifying is currently a no op for BDB. */
   return SVN_NO_ERROR;
@@ -509,7 +507,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_base__unlock,
   svn_fs_base__get_lock,
   svn_fs_base__get_locks,
-  base_bdb_verify_rev,
+  base_bdb_verify_root,
   base_bdb_freeze,
   base_bdb_set_errcall,
 };
@@ -684,14 +682,11 @@ base_create(svn_fs_t *fs, const char *pa
   /* See if compatibility with older versions was explicitly requested. */
   if (fs->config)
     {
-      if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                                   APR_HASH_KEY_STRING))
+      if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE))
         format = 1;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE))
         format = 2;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE))
         format = 3;
     }
 
@@ -1386,6 +1381,15 @@ base_get_description(void)
   return _("Module for working with a Berkeley DB repository.");
 }
 
+static svn_error_t *
+base_set_svn_fs_open(svn_fs_t *fs,
+                     svn_error_t *(*svn_fs_open_)(svn_fs_t **,
+                                                  const char *,
+                                                  apr_hash_t *,
+                                                  apr_pool_t *))
+{
+  return SVN_NO_ERROR;
+}
 
 
 /* Base FS library vtable, used by the FS loader library. */
@@ -1402,7 +1406,8 @@ static fs_library_vtable_t library_vtabl
   base_bdb_recover,
   base_bdb_pack,
   base_bdb_logfiles,
-  svn_fs_base__id_parse
+  svn_fs_base__id_parse,
+  base_set_svn_fs_open
 };
 
 svn_error_t *

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/lock.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/lock.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/lock.c Sat Mar 30 20:02:27 2013
@@ -21,6 +21,7 @@
  */
 
 
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_fs.h"
@@ -37,6 +38,7 @@
 #include "../libsvn_fs/fs-loader.h"
 #include "private/svn_fs_util.h"
 #include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
 
 
 /* Add LOCK and its associated LOCK_TOKEN (associated with PATH) as
@@ -476,9 +478,11 @@ svn_fs_base__get_locks(svn_fs_t *fs,
   while (1)
     {
       apr_size_t len, skel_len;
-      char c, *end, *skel_buf;
+      char c, *skel_buf;
       svn_skel_t *lock_skel;
       svn_lock_t *lock;
+      apr_uint64_t ui64;
+      svn_error_t *err;
 
       svn_pool_clear(iterpool);
 
@@ -486,9 +490,10 @@ svn_fs_base__get_locks(svn_fs_t *fs,
       SVN_ERR(svn_stream_readline(stream, &buf, "\n", &eof, iterpool));
       if (eof)
         break;
-      skel_len = (size_t) strtoul(buf->data, &end, 10);
-      if (skel_len == (size_t) ULONG_MAX || *end != '\0')
-        return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, NULL);
+      err = svn_cstring_strtoui64(&ui64, buf->data, 0, APR_SIZE_MAX, 10);
+      if (err)
+        return svn_error_create(SVN_ERR_MALFORMED_FILE, err, NULL);
+      skel_len = (apr_size_t)ui64;
 
       /* Now read that much into a buffer. */
       skel_buf = apr_palloc(pool, skel_len + 1);
@@ -543,8 +548,7 @@ verify_lock(svn_fs_t *fs,
        _("User '%s' does not own lock on path '%s' (currently locked by '%s')"),
        fs->access_ctx->username, lock->path, lock->owner);
 
-  else if (apr_hash_get(fs->access_ctx->lock_tokens, lock->token,
-                        APR_HASH_KEY_STRING) == NULL)
+  else if (svn_hash_gets(fs->access_ctx->lock_tokens, lock->token) == NULL)
     return svn_error_createf
       (SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
        _("Cannot verify lock on path '%s'; no matching lock-token available"),

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/revs-txns.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/revs-txns.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/revs-txns.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/revs-txns.c Sat Mar 30 20:02:27 2013
@@ -230,7 +230,7 @@ svn_fs_base__revision_prop(svn_string_t 
                                  FALSE, pool));
 
   /* And then the prop from that list (if there was a list). */
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -262,8 +262,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
   if (old_value_p)
     {
       const svn_string_t *wanted_value = *old_value_p;
-      const svn_string_t *present_value = apr_hash_get(txn->proplist, name,
-                                                       APR_HASH_KEY_STRING);
+      const svn_string_t *present_value = svn_hash_gets(txn->proplist, name);
       if ((!wanted_value != !present_value)
           || (wanted_value && present_value
               && !svn_string_compare(wanted_value, present_value)))
@@ -276,7 +275,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
         }
       /* Fall through. */
     }
-  apr_hash_set(txn->proplist, name, APR_HASH_KEY_STRING, value);
+  svn_hash_sets(txn->proplist, name, value);
 
   /* Overwrite the revision. */
   return put_txn(fs, txn, txn_id, trail, pool);
@@ -537,7 +536,7 @@ svn_fs_base__txn_prop(svn_string_t **val
                                  FALSE, pool));
 
   /* And then the prop from that list (if there was a list). */
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -575,7 +574,7 @@ svn_fs_base__set_txn_prop(svn_fs_t *fs,
     txn->proplist = apr_hash_make(pool);
 
   /* Set the property. */
-  apr_hash_set(txn->proplist, name, APR_HASH_KEY_STRING, value);
+  svn_hash_sets(txn->proplist, name, value);
 
   /* Now overwrite the transaction. */
   return put_txn(fs, txn, txn_name, trail, pool);

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_base/tree.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_base/tree.c Sat Mar 30 20:02:27 2013
@@ -39,6 +39,7 @@
 #include <string.h>
 #include <assert.h>
 #include "svn_private_config.h"
+#include "svn_hash.h"
 #include "svn_pools.h"
 #include "svn_error.h"
 #include "svn_path.h"
@@ -160,7 +161,7 @@ dag_node_cache_get(svn_fs_root_t *root,
     return NULL;
 
   /* Look in the cache for our desired item. */
-  cache_item = apr_hash_get(brd->node_cache, path, APR_HASH_KEY_STRING);
+  cache_item = svn_hash_gets(brd->node_cache, path);
   if (cache_item)
     return svn_fs_base__dag_dup(cache_item->node, pool);
 
@@ -208,7 +209,7 @@ dag_node_cache_set(svn_fs_root_t *root,
      root, and that only happens once under that root.  So, we'll be a
      little bit sloppy here, and count on callers doing the right
      thing. */
-  cache_item = apr_hash_get(brd->node_cache, path, APR_HASH_KEY_STRING);
+  cache_item = svn_hash_gets(brd->node_cache, path);
   if (cache_item)
     {
       /* ### This section is somehow broken.  I don't know how, but it
@@ -250,9 +251,8 @@ dag_node_cache_set(svn_fs_root_t *root,
     {
       /* No room.  Expire the oldest thing. */
       cache_path = brd->node_cache_keys[brd->node_cache_idx];
-      cache_item = apr_hash_get(brd->node_cache, cache_path,
-                                APR_HASH_KEY_STRING);
-      apr_hash_set(brd->node_cache, cache_path, APR_HASH_KEY_STRING, NULL);
+      cache_item = svn_hash_gets(brd->node_cache, cache_path);
+      svn_hash_sets(brd->node_cache, cache_path, NULL);
       cache_pool = cache_item->pool;
       svn_pool_clear(cache_pool);
     }
@@ -269,7 +269,7 @@ dag_node_cache_set(svn_fs_root_t *root,
 
   /* Now add it to the cache. */
   cache_path = apr_pstrdup(cache_pool, path);
-  apr_hash_set(brd->node_cache, cache_path, APR_HASH_KEY_STRING, cache_item);
+  svn_hash_sets(brd->node_cache, cache_path, cache_item);
   brd->node_cache_keys[brd->node_cache_idx] = cache_path;
 
   /* Advance the cache pointer. */
@@ -309,11 +309,10 @@ txn_body_txn_root(void *baton,
   /* Look for special txn props that represent the 'flags' behavior of
      the transaction. */
   SVN_ERR(svn_fs_base__txn_proplist_in_trail(&txnprops, svn_txn_id, trail));
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_OOD, APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_OOD))
     flags |= SVN_FS_TXN_CHECK_OOD;
 
-  if (apr_hash_get(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS,
-                   APR_HASH_KEY_STRING))
+  if (svn_hash_gets(txnprops, SVN_FS__PROP_TXN_CHECK_LOCKS))
     flags |= SVN_FS_TXN_CHECK_LOCKS;
 
   root = make_txn_root(fs, svn_txn_id, txn->base_rev, flags, trail->pool);
@@ -1191,8 +1190,7 @@ txn_body_node_prop(void *baton,
                                         trail, trail->pool));
   *(args->value_p) = NULL;
   if (proplist)
-    *(args->value_p) = apr_hash_get(proplist, args->propname,
-                                    APR_HASH_KEY_STRING);
+    *(args->value_p) = svn_hash_gets(proplist, args->propname);
   return SVN_NO_ERROR;
 }
 
@@ -1304,7 +1302,7 @@ txn_body_change_node_prop(void *baton,
     proplist = apr_hash_make(trail->pool);
 
   /* Set the property. */
-  apr_hash_set(proplist, args->name, APR_HASH_KEY_STRING, args->value);
+  svn_hash_sets(proplist, args->name, args->value);
 
   /* Overwrite the node's proplist. */
   SVN_ERR(svn_fs_base__dag_set_proplist(parent_path->node, proplist,
@@ -2544,7 +2542,7 @@ verify_locks(const char *txn_name,
         continue;
 
       /* Fetch the change associated with our path.  */
-      change = apr_hash_get(changes, path, APR_HASH_KEY_STRING);
+      change = svn_hash_gets(changes, path);
 
       /* What does it mean to succeed at lock verification for a given
          path?  For an existing file or directory getting modified
@@ -5017,7 +5015,7 @@ txn_body_get_mergeinfo_data_and_entries(
 
           SVN_ERR(svn_fs_base__dag_get_proplist(&plist, child_node,
                                                 trail, iterpool));
-          pval = apr_hash_get(plist, SVN_PROP_MERGEINFO, APR_HASH_KEY_STRING);
+          pval = svn_hash_gets(plist, SVN_PROP_MERGEINFO);
           if (! pval)
             {
               svn_string_t *id_str = svn_fs_base__id_unparse(child_id,
@@ -5041,11 +5039,10 @@ txn_body_get_mergeinfo_data_and_entries(
             }
           else
             {
-              apr_hash_set(args->result_catalog,
-                           svn_fspath__join(args->node_path, dirent->name,
-                                            result_pool),
-                           APR_HASH_KEY_STRING,
-                           child_mergeinfo);
+              svn_hash_sets(args->result_catalog,
+                            svn_fspath__join(args->node_path, dirent->name,
+                                             result_pool),
+                            child_mergeinfo);
             }
         }
 
@@ -5065,10 +5062,9 @@ txn_body_get_mergeinfo_data_and_entries(
                                          "but is not a directory"),
                                        id_str->data);
             }
-          apr_hash_set(args->children_atop_mergeinfo_trees,
-                       apr_pstrdup(children_pool, dirent->name),
-                       APR_HASH_KEY_STRING,
-                       svn_fs_base__dag_dup(child_node, children_pool));
+          svn_hash_sets(args->children_atop_mergeinfo_trees,
+                        apr_pstrdup(children_pool, dirent->name),
+                        svn_fs_base__dag_dup(child_node, children_pool));
         }
     }
 
@@ -5194,8 +5190,7 @@ txn_body_get_mergeinfo_for_path(void *ba
   svn_pool_destroy(iterpool);
 
   SVN_ERR(svn_fs_base__dag_get_proplist(&proplist, node, trail, trail->pool));
-  mergeinfo_string = apr_hash_get(proplist, SVN_PROP_MERGEINFO,
-                                  APR_HASH_KEY_STRING);
+  mergeinfo_string = svn_hash_gets(proplist, SVN_PROP_MERGEINFO);
   if (! mergeinfo_string)
     {
       svn_string_t *id_str =
@@ -5312,9 +5307,8 @@ get_mergeinfos_for_paths(svn_fs_root_t *
                                      txn_body_get_mergeinfo_for_path,
                                      &gmfp_args, FALSE, iterpool));
       if (path_mergeinfo)
-        apr_hash_set(result_catalog, apr_pstrdup(result_pool, path),
-                     APR_HASH_KEY_STRING,
-                     path_mergeinfo);
+        svn_hash_sets(result_catalog, apr_pstrdup(result_pool, path),
+                      path_mergeinfo);
 
       /* If we're including descendants, do so. */
       if (include_descendants)

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/cached_data.c Sat Mar 30 20:02:27 2013
@@ -1949,7 +1949,7 @@ parse_dir_entries(apr_hash_t **entries_p
 
       dirent->id = svn_fs_fs__id_parse(str, strlen(str), pool);
 
-      apr_hash_set(*entries_p, dirent->name, APR_HASH_KEY_STRING, dirent);
+      svn_hash_sets(*entries_p, dirent->name, dirent);
     }
 
   return SVN_NO_ERROR;
@@ -2069,7 +2069,7 @@ svn_fs_fs__rep_contents_dir_entry(svn_fs
                                           scratch_pool));
 
       /* find desired entry and return a copy in POOL, if found */
-      entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+      entry = svn_hash_gets(entries, name);
       if (entry != NULL)
         {
           entry_copy = apr_palloc(result_pool, sizeof(*entry_copy));

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/caching.c Sat Mar 30 20:02:27 2013
@@ -42,11 +42,18 @@
 /* Return a memcache in *MEMCACHE_P for FS if it's configured to use
    memcached, or NULL otherwise.  Also, sets *FAIL_STOP to a boolean
    indicating whether cache errors should be returned to the caller or
-   just passed to the FS warning handler.  Use FS->pool for allocating
-   the memcache, and POOL for temporary allocations. */
+   just passed to the FS warning handler.
+
+   *CACHE_TXDELTAS, *CACHE_FULLTEXTS and *CACHE_REVPROPS flags will be set
+   according to FS->CONFIG.  *CACHE_NAMESPACE receives the cache prefix
+   to use.
+   
+   Use FS->pool for allocating the memcache and CACHE_NAMESPACE, and POOL
+   for temporary allocations. */
 static svn_error_t *
 read_config(svn_memcache_t **memcache_p,
             svn_boolean_t *fail_stop,
+            const char **cache_namespace,
             svn_boolean_t *cache_txdeltas,
             svn_boolean_t *cache_fulltexts,
             svn_boolean_t *cache_revprops,
@@ -58,6 +65,18 @@ read_config(svn_memcache_t **memcache_p,
   SVN_ERR(svn_cache__make_memcache_from_config(memcache_p, ffd->config,
                                               fs->pool));
 
+  /* No cache namespace by default.  I.e. all FS instances share the
+   * cached data.  If you specify different namespaces, the data will
+   * share / compete for the same cache memory but keys will not match
+   * across namespaces and, thus, cached data will not be shared between
+   * namespaces.
+   */
+  *cache_namespace
+    = apr_pstrdup(fs->pool,
+                  svn_hash__get_cstring(fs->config,
+                                        SVN_FS_CONFIG_FSFS_CACHE_NS,
+                                        ""));
+
   /* don't cache text deltas by default.
    * Once we reconstructed the fulltexts from the deltas,
    * these deltas are rarely re-used. Therefore, only tools
@@ -308,16 +327,20 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   svn_boolean_t cache_txdeltas;
   svn_boolean_t cache_fulltexts;
   svn_boolean_t cache_revprops;
+  const char *cache_namespace;
 
   /* Evaluating the cache configuration. */
   SVN_ERR(read_config(&memcache,
                       &no_handler,
+                      &cache_namespace,
                       &cache_txdeltas,
                       &cache_fulltexts,
                       &cache_revprops,
                       fs,
                       pool));
 
+  prefix = apr_pstrcat(pool, "ns:", cache_namespace, ":", prefix, NULL);
+
   membuffer = svn_cache__get_global_membuffer_cache();
 
   /* Make the cache for revision roots.  For the vast majority of

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.c Sat Mar 30 20:02:27 2013
@@ -189,7 +189,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_fs__unlock,
   svn_fs_fs__get_lock,
   svn_fs_fs__get_locks,
-  svn_fs_fs__verify_rev,
+  svn_fs_fs__verify_root,
   fs_freeze,
   fs_set_errcall
 };
@@ -405,6 +405,17 @@ fs_get_description(void)
   return _("Module for working with a plain file (FSFS) repository.");
 }
 
+static svn_error_t *
+fs_set_svn_fs_open(svn_fs_t *fs,
+                   svn_error_t *(*svn_fs_open_)(svn_fs_t **,
+                                                const char *,
+                                                apr_hash_t *,
+                                                apr_pool_t *))
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  ffd->svn_fs_open_ = svn_fs_open_;
+  return SVN_NO_ERROR;
+}
 
 
 /* Base FS library vtable, used by the FS loader library. */
@@ -421,7 +432,9 @@ static fs_library_vtable_t library_vtabl
   fs_get_description,
   svn_fs_fs__recover,
   fs_pack,
-  fs_logfiles
+  fs_logfiles,
+  NULL /* parse_id */,
+  fs_set_svn_fs_open
 };
 
 svn_error_t *

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h Sat Mar 30 20:02:27 2013
@@ -420,6 +420,10 @@ typedef struct fs_fs_data_t
   /* Maximum number of length of the linear part at the top of the
    * deltification history after which skip deltas will be used. */
   apr_int64_t max_linear_deltification;
+
+  /* Pointer to svn_fs_open. */
+  svn_error_t *(*svn_fs_open_)(svn_fs_t **, const char *, apr_hash_t *,
+                               apr_pool_t *);
 } fs_fs_data_t;
 
 

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.c Sat Mar 30 20:02:27 2013
@@ -957,7 +957,7 @@ write_revision_zero(svn_fs_t *fs)
   date.data = svn_time_to_cstring(apr_time_now(), fs->pool);
   date.len = strlen(date.data);
   proplist = apr_hash_make(fs->pool);
-  apr_hash_set(proplist, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING, &date);
+  svn_hash_sets(proplist, SVN_PROP_REVISION_DATE, &date);
   return set_revision_proplist(fs, 0, proplist, fs->pool);
 }
 
@@ -973,20 +973,15 @@ svn_fs_fs__create(svn_fs_t *fs,
   /* See if compatibility with older versions was explicitly requested. */
   if (fs->config)
     {
-      if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
-                                   APR_HASH_KEY_STRING))
+      if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE))
         format = 1;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE))
         format = 2;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE))
         format = 3;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE))
         format = 4;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_9_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
+      else if (svn_hash_gets(fs->config, SVN_FS_CONFIG_PRE_1_9_COMPATIBLE))
         format = 6;
     }
   ffd->format = format;
@@ -1156,7 +1151,7 @@ svn_fs_fs__get_node_origin(const svn_fs_
   if (node_origins)
     {
       svn_string_t *origin_id_str =
-        apr_hash_get(node_origins, node_id, APR_HASH_KEY_STRING);
+        svn_hash_gets(node_origins, node_id);
       if (origin_id_str)
         *origin_id = svn_fs_fs__id_parse(origin_id_str->data,
                                          origin_id_str->len, pool);
@@ -1263,7 +1258,7 @@ svn_fs_fs__revision_prop(svn_string_t **
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
   SVN_ERR(svn_fs_fs__revision_proplist(&table, fs, rev, pool));
 
-  *value_p = apr_hash_get(table, propname, APR_HASH_KEY_STRING);
+  *value_p = svn_hash_gets(table, propname);
 
   return SVN_NO_ERROR;
 }
@@ -1292,8 +1287,7 @@ change_rev_prop_body(void *baton, apr_po
   if (cb->old_value_p)
     {
       const svn_string_t *wanted_value = *cb->old_value_p;
-      const svn_string_t *present_value = apr_hash_get(table, cb->name,
-                                                       APR_HASH_KEY_STRING);
+      const svn_string_t *present_value = svn_hash_gets(table, cb->name);
       if ((!wanted_value != !present_value)
           || (wanted_value && present_value
               && !svn_string_compare(wanted_value, present_value)))
@@ -1306,7 +1300,7 @@ change_rev_prop_body(void *baton, apr_po
         }
       /* Fall through. */
     }
-  apr_hash_set(table, cb->name, APR_HASH_KEY_STRING, cb->value);
+  svn_hash_sets(table, cb->name, cb->value);
 
   return set_revision_proplist(cb->fs, cb->rev, table, pool);
 }
@@ -1445,7 +1439,7 @@ svn_fs_fs__verify(svn_fs_t *fs,
       baton->notify_func = notify_func;
       baton->notify_baton = notify_baton;
       
-      /* tell the user that we are now read to do *something* */
+      /* tell the user that we are now ready to do *something* */
       if (notify_func)
         notify_func(SVN_INVALID_REVNUM, notify_baton, baton->pool);
 
@@ -1463,25 +1457,3 @@ svn_fs_fs__verify(svn_fs_t *fs,
 
   return SVN_NO_ERROR;
 }
-
-svn_error_t *
-svn_fs_fs__verify_rev(svn_fs_t *fs,
-                      svn_revnum_t revision,
-                      apr_pool_t *pool)
-{
-  svn_fs_root_t *root;
-
-  /* Issue #4129: bogus pred-counts and minfo-cnt's on the root node-rev
-     (and elsewhere).  This code makes more thorough checks than the
-     commit-time checks in validate_root_noderev(). */
-
-  /* ### TODO: Make sure caches are disabled.
-
-     When this code is called in the library, we want to ensure we
-     use the on-disk data --- rather than some data that was read
-     in the possibly-distance past and cached since. */
-  SVN_ERR(svn_fs_fs__revision_root(&root, fs, revision, pool));
-  SVN_ERR(svn_fs_fs__verify_root(root, pool));
-
-  return SVN_NO_ERROR;
-}

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs_fs.h Sat Mar 30 20:02:27 2013
@@ -52,13 +52,6 @@ svn_error_t *svn_fs_fs__verify(svn_fs_t 
                                void *cancel_baton,
                                apr_pool_t *pool);
 
-/* Verify metadata of REVISION in filesystem FS.
- * Use POOL for temporary allocations. */
-svn_error_t *
-svn_fs_fs__verify_rev(svn_fs_t *fs,
-                      svn_revnum_t revision,
-                      apr_pool_t *pool);
-
 /* Set *YOUNGEST to the youngest revision in filesystem FS.  Do any
    temporary allocation in POOL. */
 svn_error_t *svn_fs_fs__youngest_rev(svn_revnum_t *youngest,

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/lock.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/lock.c Sat Mar 30 20:02:27 2013
@@ -106,7 +106,7 @@ hash_fetch(apr_hash_t *hash,
            const char *key,
            apr_pool_t *pool)
 {
-  svn_string_t *str = apr_hash_get(hash, key, APR_HASH_KEY_STRING);
+  svn_string_t *str = svn_hash_gets(hash, key);
   return str ? str->data : NULL;
 }
 
@@ -325,8 +325,8 @@ read_digest_file(apr_hash_t **children_p
 
       for (i = 0; i < kiddos->nelts; i++)
         {
-          apr_hash_set(*children_p, APR_ARRAY_IDX(kiddos, i, const char *),
-                       APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(*children_p, APR_ARRAY_IDX(kiddos, i, const char *),
+                        (void *)1);
         }
     }
   return SVN_NO_ERROR;
@@ -388,11 +388,9 @@ set_lock(const char *fs_path,
       else
         {
           /* If we already have an entry for this path, we're done. */
-          if (apr_hash_get(this_children, lock_digest_path,
-                           APR_HASH_KEY_STRING))
+          if (svn_hash_gets(this_children, lock_digest_path))
             break;
-          apr_hash_set(this_children, lock_digest_path,
-                       APR_HASH_KEY_STRING, (void *)1);
+          svn_hash_sets(this_children, lock_digest_path, (void *)1);
         }
       SVN_ERR(write_digest_file(this_children, this_lock, fs_path,
                                 digest_path, perms_reference, subpool));
@@ -449,7 +447,7 @@ delete_lock(svn_fs_t *fs,
         }
 
       if (child_to_kill)
-        apr_hash_set(this_children, child_to_kill, APR_HASH_KEY_STRING, NULL);
+        svn_hash_sets(this_children, child_to_kill, NULL);
 
       if (! (this_lock || apr_hash_count(this_children) != 0))
         {
@@ -691,8 +689,7 @@ verify_lock(svn_fs_t *fs,
        _("User '%s' does not own lock on path '%s' (currently locked by '%s')"),
        fs->access_ctx->username, lock->path, lock->owner);
 
-  else if (apr_hash_get(fs->access_ctx->lock_tokens, lock->token,
-                        APR_HASH_KEY_STRING) == NULL)
+  else if (svn_hash_gets(fs->access_ctx->lock_tokens, lock->token) == NULL)
     return svn_error_createf
       (SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
        _("Cannot verify lock on path '%s'; no matching lock-token available"),