subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1641647 [2/10] - in /subversion/branches/move-tracking-2: ./ build/ build/ac-macros/ subversion/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/include/ subversion/include/private/ subversion/libsvn_auth_gnome_ke...
Date Tue, 25 Nov 2014 16:26:51 GMT
Modified: subversion/branches/move-tracking-2/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_client/update.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_client/update.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_client/update.c Tue Nov 25 16:26:48 2014
@@ -204,7 +204,9 @@ record_conflict(svn_wc_conflict_result_t
 */
 static svn_error_t *
 update_internal(svn_revnum_t *result_rev,
+                svn_boolean_t *timestamp_sleep,
                 apr_hash_t *conflicted_paths,
+                svn_ra_session_t **ra_session_p,
                 const char *local_abspath,
                 const char *anchor_abspath,
                 const svn_opt_revision_t *revision,
@@ -213,11 +215,10 @@ update_internal(svn_revnum_t *result_rev
                 svn_boolean_t ignore_externals,
                 svn_boolean_t allow_unver_obstructions,
                 svn_boolean_t adds_as_modification,
-                svn_boolean_t *timestamp_sleep,
                 svn_boolean_t notify_summary,
                 svn_client_ctx_t *ctx,
-                svn_ra_session_t **ra_session_p,
-                apr_pool_t *pool)
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
 {
 #if 0
   svn_update_editor3_t *update_editor;
@@ -258,7 +259,7 @@ update_internal(svn_revnum_t *result_rev
     depth_is_sticky = FALSE;
 
   if (strcmp(local_abspath, anchor_abspath))
-    target = svn_dirent_basename(local_abspath, pool);
+    target = svn_dirent_basename(local_abspath, scratch_pool);
   else
     target = "";
 
@@ -266,8 +267,8 @@ update_internal(svn_revnum_t *result_rev
   SVN_ERR(svn_wc__node_get_base(NULL, NULL, &repos_relpath, &repos_root_url,
                                 &repos_uuid, NULL,
                                 ctx->wc_ctx, anchor_abspath,
-                                TRUE, FALSE,
-                                pool, pool));
+                                TRUE /* ignore_enoent */,
+                                scratch_pool, scratch_pool));
 
   /* It does not make sense to update conflict victims. */
   if (repos_relpath)
@@ -276,11 +277,11 @@ update_internal(svn_revnum_t *result_rev
       svn_boolean_t text_conflicted, prop_conflicted;
 
       anchor_url = svn_path_url_add_component2(repos_root_url, repos_relpath,
-                                               pool);
+                                               scratch_pool);
 
       err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted,
                                  NULL,
-                                 ctx->wc_ctx, local_abspath, pool);
+                                 ctx->wc_ctx, local_abspath, scratch_pool);
 
       if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
         return svn_error_trace(err);
@@ -303,9 +304,9 @@ update_internal(svn_revnum_t *result_rev
                                     target_conflicted
                                       ? svn_wc_notify_skip_conflicted
                                       : svn_wc_notify_update_skip_working_only,
-                                    pool);
+                                    scratch_pool);
 
-          ctx->notify_func2(ctx->notify_baton2, nt, pool);
+          ctx->notify_func2(ctx->notify_baton2, nt, scratch_pool);
         }
       return SVN_NO_ERROR;
     }
@@ -322,32 +323,33 @@ update_internal(svn_revnum_t *result_rev
                                  local_abspath,
                                  ctx->cancel_func, ctx->cancel_baton,
                                  ctx->notify_func2, ctx->notify_baton2,
-                                 pool));
+                                 scratch_pool));
 
           /* Target excluded, we are done now */
           return SVN_NO_ERROR;
         }
 
       SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath,
-                                TRUE, TRUE, pool));
+                                TRUE, TRUE, scratch_pool));
       if (target_kind == svn_node_dir)
         {
           SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     ctx->notify_func2, ctx->notify_baton2,
-                                    pool));
+                                    scratch_pool));
         }
     }
 
   /* check whether the "clean c/o" optimization is applicable */
-  SVN_ERR(is_empty_wc(&clean_checkout, local_abspath, anchor_abspath, pool));
+  SVN_ERR(is_empty_wc(&clean_checkout, local_abspath, anchor_abspath,
+                      scratch_pool));
 
   /* Get the external diff3, if any. */
   svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS,
                  SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
 
   if (diff3_cmd != NULL)
-    SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, pool));
+    SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, scratch_pool));
 
   /* See if the user wants last-commit timestamps instead of current ones. */
   SVN_ERR(svn_config_get_bool(cfg, &use_commit_times,
@@ -359,7 +361,7 @@ update_internal(svn_revnum_t *result_rev
   svn_config_get(cfg, &preserved_exts_str, SVN_CONFIG_SECTION_MISCELLANY,
                  SVN_CONFIG_OPTION_PRESERVED_CF_EXTS, "");
   preserved_exts = *preserved_exts_str
-    ? svn_cstring_split(preserved_exts_str, "\n\r\t\v ", FALSE, pool)
+    ? svn_cstring_split(preserved_exts_str, "\n\r\t\v ", FALSE, scratch_pool)
     : NULL;
 
   /* Let everyone know we're starting a real update (unless we're
@@ -368,12 +370,12 @@ update_internal(svn_revnum_t *result_rev
     {
       svn_wc_notify_t *notify
         = svn_wc_create_notify(local_abspath, svn_wc_notify_update_started,
-                               pool);
+                               scratch_pool);
       notify->kind = svn_node_none;
       notify->content_state = notify->prop_state
         = svn_wc_notify_state_inapplicable;
       notify->lock_state = svn_wc_notify_lock_state_inapplicable;
-      (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
+      ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
     }
 
   /* Try to reuse the RA session by reparenting it to the anchor_url.
@@ -382,7 +384,7 @@ update_internal(svn_revnum_t *result_rev
    * have to be in the same repo. */
   if (ra_session)
     {
-      svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, pool);
+      svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool);
       if (err)
         {
           if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
@@ -410,7 +412,8 @@ update_internal(svn_revnum_t *result_rev
                                                    anchor_abspath, NULL,
                                                    TRUE /* write_dav_props */,
                                                    TRUE /* read_dav_props */,
-                                                   ctx, pool, pool));
+                                                   ctx,
+                                                   result_pool, scratch_pool));
       *ra_session_p = ra_session;
     }
 
@@ -422,12 +425,13 @@ update_internal(svn_revnum_t *result_rev
 
       /* To relocate everything inside our repository we need the old and new
          repos root. */
-      SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url, pool));
+      SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url,
+                                     scratch_pool));
 
       /* svn_client_relocate2() will check the uuid */
       SVN_ERR(svn_client_relocate2(anchor_abspath, repos_root_url,
                                    new_repos_root_url, ignore_externals,
-                                   ctx, pool));
+                                   ctx, scratch_pool));
 
       /* Store updated repository root for externals */
       repos_root_url = new_repos_root_url;
@@ -448,10 +452,10 @@ update_internal(svn_revnum_t *result_rev
      to take a URL as easily as a local path?  */
   SVN_ERR(svn_client__get_revision_number(&revnum, NULL, ctx->wc_ctx,
                                           local_abspath, ra_session, &opt_rev,
-                                          pool));
+                                          scratch_pool));
 
   SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth,
-                                SVN_RA_CAPABILITY_DEPTH, pool));
+                                SVN_RA_CAPABILITY_DEPTH, scratch_pool));
 
   dfb.ra_session = ra_session;
   dfb.target_revision = revnum;
@@ -459,7 +463,7 @@ update_internal(svn_revnum_t *result_rev
 
   SVN_ERR(svn_client__get_inheritable_props(&wcroot_iprops, local_abspath,
                                             revnum, depth, ra_session,
-                                            ctx, pool, pool));
+                                            ctx, scratch_pool, scratch_pool));
 
 #if 0
   /* Fetch the update editor.  If REVISION is invalid, that's okay;
@@ -512,7 +516,7 @@ update_internal(svn_revnum_t *result_rev
                                     NULL, NULL,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     ctx->notify_func2, ctx->notify_baton2,
-                                    pool, pool));
+                                    scratch_pool, scratch_pool));
 
   /* Tell RA to do an update of URL+TARGET to REVISION; if we pass an
      invalid revnum, that means RA will use the latest revision.  */
@@ -523,7 +527,8 @@ update_internal(svn_revnum_t *result_rev
                              : svn_depth_unknown),
                             FALSE /* send_copyfrom_args */,
                             FALSE /* ignore_ancestry */,
-                            update_editor, update_edit_baton, pool, pool));
+                            update_editor, update_edit_baton,
+                            scratch_pool, scratch_pool));
 #endif
 
   /* Past this point, we assume the WC is going to be modified so we will
@@ -540,7 +545,7 @@ update_internal(svn_revnum_t *result_rev
                                   use_commit_times,
                                   ctx->cancel_func, ctx->cancel_baton,
                                   ctx->notify_func2, ctx->notify_baton2,
-                                  pool));
+                                  scratch_pool));
 
   /* We handle externals after the update is complete, so that
      handling external items (and any errors therefrom) doesn't delay
@@ -553,13 +558,14 @@ update_internal(svn_revnum_t *result_rev
       SVN_ERR(svn_wc__externals_gather_definitions(&new_externals,
                                                    &new_depths,
                                                    ctx->wc_ctx, local_abspath,
-                                                   depth, pool, pool));
+                                                   depth,
+                                                   scratch_pool, scratch_pool));
 
       SVN_ERR(svn_client__handle_externals(new_externals,
                                            new_depths,
                                            repos_root_url, local_abspath,
-                                           depth, timestamp_sleep,
-                                           ctx, pool));
+                                           depth, timestamp_sleep, ra_session,
+                                           ctx, scratch_pool));
     }
 
   /* Let everyone know we're finished here (unless we're asked not to). */
@@ -567,13 +573,13 @@ update_internal(svn_revnum_t *result_rev
     {
       svn_wc_notify_t *notify
         = svn_wc_create_notify(local_abspath, svn_wc_notify_update_completed,
-                               pool);
+                               scratch_pool);
       notify->kind = svn_node_none;
       notify->content_state = notify->prop_state
         = svn_wc_notify_state_inapplicable;
       notify->lock_state = svn_wc_notify_lock_state_inapplicable;
       notify->revision = revnum;
-      (*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
+      ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
     }
 
   /* If the caller wants the result revision, give it to them. */
@@ -585,6 +591,7 @@ update_internal(svn_revnum_t *result_rev
 
 svn_error_t *
 svn_client__update_internal(svn_revnum_t *result_rev,
+                            svn_boolean_t *timestamp_sleep,
                             const char *local_abspath,
                             const svn_opt_revision_t *revision,
                             svn_depth_t depth,
@@ -594,14 +601,13 @@ svn_client__update_internal(svn_revnum_t
                             svn_boolean_t adds_as_modification,
                             svn_boolean_t make_parents,
                             svn_boolean_t innerupdate,
-                            svn_boolean_t *timestamp_sleep,
+                            svn_ra_session_t *ra_session,
                             svn_client_ctx_t *ctx,
                             apr_pool_t *pool)
 {
   const char *anchor_abspath, *lockroot_abspath;
   svn_error_t *err;
   svn_opt_revision_t peg_revision = *revision;
-  svn_ra_session_t *ra_session = NULL;
   apr_hash_t *conflicted_paths
     = ctx->conflict_func2 ? apr_hash_make(pool) : NULL;
 
@@ -614,16 +620,21 @@ svn_client__update_internal(svn_revnum_t
       const char *parent_abspath = local_abspath;
       apr_array_header_t *missing_parents =
         apr_array_make(pool, 4, sizeof(const char *));
+      apr_pool_t *iterpool;
+
+      iterpool = svn_pool_create(pool);
 
       while (1)
         {
+          svn_pool_clear(iterpool);
+
           /* Try to lock.  If we can't lock because our target (or its
              parent) isn't a working copy, we'll try to walk up the
              tree to find a working copy, remembering this path's
              parent as one we need to flesh out.  */
           err = svn_wc__acquire_write_lock(&lockroot_abspath, ctx->wc_ctx,
                                            parent_abspath, !innerupdate,
-                                           pool, pool);
+                                           pool, iterpool);
           if (!err)
             break;
           if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
@@ -645,12 +656,14 @@ svn_client__update_internal(svn_revnum_t
           const char *missing_parent =
             APR_ARRAY_IDX(missing_parents, i, const char *);
 
-          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,
-                                FALSE, ctx, &ra_session, pool);
+          svn_pool_clear(iterpool);
+
+          err = update_internal(result_rev, timestamp_sleep, conflicted_paths,
+                                &ra_session, missing_parent,
+                                anchor_abspath, &peg_revision, svn_depth_empty,
+                                FALSE, ignore_externals,
+                                allow_unver_obstructions, adds_as_modification,
+                                FALSE, ctx, pool, iterpool);
           if (err)
             goto cleanup;
           anchor_abspath = missing_parent;
@@ -661,6 +674,8 @@ svn_client__update_internal(svn_revnum_t
           peg_revision.kind = svn_opt_revision_number;
           peg_revision.value.number = *result_rev;
         }
+
+      svn_pool_destroy(iterpool);
     }
   else
     {
@@ -670,16 +685,17 @@ svn_client__update_internal(svn_revnum_t
       anchor_abspath = lockroot_abspath;
     }
 
-  err = update_internal(result_rev, conflicted_paths,
+  err = update_internal(result_rev, timestamp_sleep, conflicted_paths,
+                        &ra_session,
                         local_abspath, anchor_abspath,
                         &peg_revision, depth, depth_is_sticky,
                         ignore_externals, allow_unver_obstructions,
-                        adds_as_modification, timestamp_sleep,
-                        TRUE, ctx, &ra_session, pool);
+                        adds_as_modification,
+                        TRUE, ctx, pool, pool);
 
   /* Give the conflict resolver callback the opportunity to
    * resolve any conflicts that were raised. */
-  if (! err && ctx->conflict_func2)
+  if (! err && ctx->conflict_func2 && apr_hash_count(conflicted_paths))
     {
       err = svn_client__resolve_conflicts(NULL, conflicted_paths, ctx, pool);
     }
@@ -743,14 +759,13 @@ svn_client_update4(apr_array_header_t **
       err = svn_dirent_get_absolute(&local_abspath, path, iterpool);
       if (err)
         goto cleanup;
-      err = svn_client__update_internal(&result_rev, local_abspath,
+      err = svn_client__update_internal(&result_rev, &sleep, local_abspath,
                                         revision, depth, depth_is_sticky,
                                         ignore_externals,
                                         allow_unver_obstructions,
                                         adds_as_modification,
                                         make_parents,
-                                        FALSE, &sleep,
-                                        ctx,
+                                        FALSE, NULL, ctx,
                                         iterpool);
 
       if (err)
@@ -770,7 +785,7 @@ svn_client_update4(apr_array_header_t **
               notify = svn_wc_create_notify(path,
                                             svn_wc_notify_skip,
                                             iterpool);
-              (*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
+              ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
             }
         }
       else

Modified: subversion/branches/move-tracking-2/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_client/util.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_client/util.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_client/util.c Tue Nov 25 16:26:48 2014
@@ -200,7 +200,6 @@ svn_client__wc_node_get_base(svn_client_
                                 NULL,
                                 wc_ctx, wc_abspath,
                                 TRUE /* ignore_enoent */,
-                                TRUE /* show_hidden */,
                                 result_pool, scratch_pool));
   if ((*base_p)->repos_root_url && relpath)
     {

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/path_driver.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/path_driver.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/path_driver.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/path_driver.c Tue Nov 25 16:26:48 2014
@@ -187,7 +187,7 @@ svn_delta_path_driver2(const svn_delta_e
      driving the editor. */
   for (; i < paths->nelts; i++)
     {
-      const char *pdir, *bname;
+      const char *pdir;
       const char *common = "";
       size_t common_len;
 
@@ -224,9 +224,10 @@ svn_delta_path_driver2(const svn_delta_e
       /*** Step C - Open any directories between the common ancestor
            and the parent of the current path. ***/
       if (*path == '/')
-        svn_fspath__split(&pdir, &bname, path, iterpool);
+        pdir = svn_fspath__dirname(path, iterpool);
       else
-        svn_relpath_split(&pdir, &bname, path, iterpool);
+        pdir = svn_relpath_dirname(path, iterpool);
+
       if (strlen(pdir) > common_len)
         {
           const char *piece = pdir + common_len + 1;

Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/text_delta.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/text_delta.c Tue Nov 25 16:26:48 2014
@@ -637,13 +637,17 @@ patterning_copy(char *target, const char
   const apr_size_t overlap = target - source;
   while (len > overlap)
     {
-      target = memcpy(target, source, overlap);
+      memcpy(target, source, overlap);
+      target += overlap;
       len -= overlap;
     }
 
   /* Copy any remaining source pattern. */
   if (len)
-    target = memcpy(target, source, len);
+    {
+      memcpy(target, source, len);
+      target += len;
+    }
 
   return target;
 }

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_base/reps-strings.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_base/reps-strings.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_base/reps-strings.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_base/reps-strings.c Tue Nov 25 16:26:48 2014
@@ -920,7 +920,7 @@ txn_body_read_rep(void *baton, trail_t *
                                            args->rb->md5_checksum)))
                 return svn_error_create(SVN_ERR_FS_CORRUPT,
                         svn_checksum_mismatch_err(rep->md5_checksum,
-                             args->rb->sha1_checksum, trail->pool,
+                             args->rb->md5_checksum, trail->pool,
                              _("MD5 checksum mismatch on representation '%s'"),
                              args->rb->rep_key),
                         NULL);

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/cached_data.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/cached_data.c Tue Nov 25 16:26:48 2014
@@ -154,7 +154,7 @@ dbg_log_access(svn_fs_t *fs,
     }
 
   /* some info is only available in format7 repos */
-  if (svn_fs_fs__use_log_addressing(fs, revision))
+  if (svn_fs_fs__use_log_addressing(fs))
     {
       /* reverse index lookup: get item description in ENTRY */
       SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, rev_file, revision,
@@ -277,15 +277,13 @@ err_dangling_id(svn_fs_t *fs, const svn_
      id_str->data, fs->path);
 }
 
-/* Return TRUE, if REVISION in FS is of a format that supports block-read
-   and the feature has been enabled. */
+/* Return TRUE, if FS is of a format that supports block-read and the
+   feature has been enabled. */
 static svn_boolean_t
-use_block_read(svn_fs_t *fs,
-               svn_revnum_t revision)
+use_block_read(svn_fs_t *fs)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
-  return   svn_fs_fs__use_log_addressing(fs, revision)
-        && ffd->use_block_read;
+  return svn_fs_fs__use_log_addressing(fs) && ffd->use_block_read;
 }
 
 /* Get the node-revision for the node ID in FS.
@@ -360,7 +358,7 @@ get_node_revision_body(node_revision_t *
                                      rev_item->number,
                                      scratch_pool));
 
-      if (use_block_read(fs, rev_item->revision))
+      if (use_block_read(fs))
         {
           /* block-read will parse the whole block and will also return
              the one noderev that we need right now. */
@@ -552,7 +550,7 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
   fs_fs_data_t *ffd = fs->fsap_data;
   SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, scratch_pool));
 
-  if (svn_fs_fs__use_log_addressing(fs, rev))
+  if (svn_fs_fs__use_log_addressing(fs))
     {
       *root_id_p = svn_fs_fs__id_create_root(rev, result_pool);
     }
@@ -840,7 +838,7 @@ create_rep_state_body(rep_state_t **rep_
       /* populate the cache if appropriate */
       if (! svn_fs_fs__id_txn_used(&rep->txn_id))
         {
-          if (use_block_read(fs, rep->revision))
+          if (use_block_read(fs))
             SVN_ERR(block_read(NULL, fs, rep->revision, rep->item_index,
                                rs->sfile->rfile, result_pool, scratch_pool));
           else
@@ -922,14 +920,24 @@ svn_fs_fs__check_rep(representation_t *r
                      void **hint,
                      apr_pool_t *scratch_pool)
 {
-  if (svn_fs_fs__use_log_addressing(fs, rep->revision))
+  if (svn_fs_fs__use_log_addressing(fs))
     {
       apr_off_t offset;
       svn_fs_fs__p2l_entry_t *entry;
+      svn_fs_fs__revision_file_t *rev_file = NULL;
 
-      svn_fs_fs__revision_file_t *rev_file;
-      SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rep->revision,
-                                               scratch_pool, scratch_pool));
+      /* Reuse the revision file provided by *HINT, if it is given and
+       * actually the rev / pack file that we want. */
+      svn_revnum_t start_rev = svn_fs_fs__packed_base_rev(fs, rep->revision);
+      if (hint)
+        rev_file = *(svn_fs_fs__revision_file_t **)hint;
+
+      if (rev_file == NULL || rev_file->start_revision != start_rev)
+        SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rep->revision,
+                                                 scratch_pool, scratch_pool));
+
+      if (hint)
+        *hint = rev_file;
 
       /* This will auto-retry if there was a background pack. */
       SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rep->revision,
@@ -952,8 +960,6 @@ svn_fs_fs__check_rep(representation_t *r
                                               "%" APR_UINT64_T_FMT,
                                               rep->item_index),
                                  rep->revision);
-
-      SVN_ERR(svn_fs_fs__close_revision_file(rev_file));
     }
   else
     {
@@ -1477,7 +1483,7 @@ read_delta_window(svn_txdelta_window_t *
      because the block is unlikely to contain other data. */
   if (   rs->chunk_index == 0
       && SVN_IS_VALID_REVNUM(rs->revision)
-      && use_block_read(rs->sfile->fs, rs->revision)
+      && use_block_read(rs->sfile->fs)
       && rs->raw_window_cache)
     {
       SVN_ERR(block_read(NULL, rs->sfile->fs, rs->revision, rs->item_index,
@@ -2710,7 +2716,7 @@ svn_fs_fs__get_changes(apr_array_header_
       SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev,
                                                scratch_pool, scratch_pool));
 
-      if (use_block_read(fs, rev))
+      if (use_block_read(fs))
         {
           /* 'block-read' will also provide us with the desired data */
           SVN_ERR(block_read((void **)changes, fs,
@@ -2721,7 +2727,7 @@ svn_fs_fs__get_changes(apr_array_header_
         {
           /* Addressing is very different for old formats
            * (needs to read the revision trailer). */
-          if (svn_fs_fs__use_log_addressing(fs, rev))
+          if (svn_fs_fs__use_log_addressing(fs))
             SVN_ERR(svn_fs_fs__item_offset(&changes_offset, fs,
                                            revision_file, rev, NULL,
                                            SVN_FS_FS__ITEM_INDEX_CHANGES,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/caching.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/caching.c Tue Nov 25 16:26:48 2014
@@ -66,9 +66,8 @@ normalize_key_part(const char *original,
   return normalized->data;
 }
 
-/* *CACHE_TXDELTAS, *CACHE_FULLTEXTS and *CACHE_REVPROPS flags will be set
-   according to FS->CONFIG.  *CACHE_NAMESPACE receives the cache prefix
-   to use.
+/* *CACHE_TXDELTAS, *CACHE_FULLTEXTS 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. */
@@ -76,7 +75,6 @@ static svn_error_t *
 read_config(const char **cache_namespace,
             svn_boolean_t *cache_txdeltas,
             svn_boolean_t *cache_fulltexts,
-            svn_boolean_t *cache_revprops,
             svn_fs_t *fs,
             apr_pool_t *pool)
 {
@@ -119,10 +117,6 @@ read_config(const char **cache_namespace
                          SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                          TRUE);
 
-  /* For now, always disable revprop caching.
-   */
-  *cache_revprops = FALSE;
-
   return SVN_NO_ERROR;
 }
 
@@ -354,14 +348,12 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   svn_boolean_t no_handler = ffd->fail_stop;
   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(&cache_namespace,
                       &cache_txdeltas,
                       &cache_fulltexts,
-                      &cache_revprops,
                       fs,
                       pool));
 
@@ -567,28 +559,6 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
       ffd->mergeinfo_existence_cache = NULL;
     }
 
-  /* if enabled, cache revprops */
-  if (cache_revprops)
-    {
-      SVN_ERR(create_cache(&(ffd->revprop_cache),
-                           NULL,
-                           membuffer,
-                           0, 0, /* Do not use inprocess cache */
-                           svn_fs_fs__serialize_properties,
-                           svn_fs_fs__deserialize_properties,
-                           sizeof(pair_cache_key_t),
-                           apr_pstrcat(pool, prefix, "REVPROP",
-                                       SVN_VA_NULL),
-                           SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY,
-                           fs,
-                           no_handler,
-                           fs->pool, pool));
-    }
-  else
-    {
-      ffd->revprop_cache = NULL;
-    }
-
   /* if enabled, cache text deltas and their combinations */
   if (cache_txdeltas)
     {

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/dump-index.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/dump-index.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/dump-index.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/dump-index.c Tue Nov 25 16:26:48 2014
@@ -45,7 +45,7 @@ svn_fs_fs__dump_index(svn_fs_t *fs,
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
   /* Check the FS format. */
-  if (! svn_fs_fs__use_log_addressing(fs, revision))
+  if (! svn_fs_fs__use_log_addressing(fs))
     return svn_error_create(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL, NULL);
 
   /* Revision & index file access object. */

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.c Tue Nov 25 16:26:48 2014
@@ -214,6 +214,7 @@ fs_info(const void **fsfs_info,
   info->fs_type = SVN_FS_TYPE_FSFS;
   info->shard_size = ffd->max_files_per_dir;
   info->min_unpacked_rev = ffd->min_unpacked_rev;
+  info->log_addressing = ffd->use_log_addressing;
   *fsfs_info = info;
   return SVN_NO_ERROR;
 }
@@ -266,7 +267,7 @@ static svn_error_t *
 initialize_fs_struct(svn_fs_t *fs)
 {
   fs_fs_data_t *ffd = apr_pcalloc(fs->pool, sizeof(*ffd));
-  ffd->min_log_addressing_rev = SVN_INVALID_REVNUM;
+  ffd->use_log_addressing = FALSE;
 
   fs->vtable = &fs_vtable;
   fs->fsap_data = ffd;

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.h?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs.h Tue Nov 25 16:26:48 2014
@@ -59,8 +59,6 @@ extern "C" {
 #define PATH_REVPROPS_DIR     "revprops"         /* Directory of revprops */
 #define PATH_TXNS_DIR         "transactions"     /* Directory of transactions in
                                                     repos w/o log addressing */
-#define PATH_TXNS_LA_DIR      "transactions-la"  /* Directory of transactions in
-                                                    repos with log addressing */
 #define PATH_NODE_ORIGINS_DIR "node-origins"     /* Lazy node-origin cache */
 #define PATH_TXN_PROTOS_DIR   "txn-protorevs"    /* Directory of proto-revs */
 #define PATH_TXN_CURRENT      "txn-current"      /* File with next txn key */
@@ -191,7 +189,6 @@ extern "C" {
    per file.  On Windows apr implements the locking as per file handle
    locks, so we don't have to add our own mutex for just in-process
    synchronization. */
-/* Compare ../libsvn_subr/named_atomic.c:USE_THREAD_MUTEX */
 #if APR_HAS_THREADS && !defined(WIN32)
 #define SVN_FS_FS__USE_LOCK_MUTEX 1
 #else
@@ -305,11 +302,9 @@ typedef struct fs_fs_data_t
      layouts) or zero (for linear layouts). */
   int max_files_per_dir;
 
-  /* The first revision that uses logical addressing.  SVN_INVALID_REVNUM
-     if there is no such revision (pre-f7 or non-sharded).  May be a
-     future revision if the current shard started with physical addressing
-     and is not complete, yet. */
-  svn_revnum_t min_log_addressing_rev;
+  /* If set, this FS is using logical addressing. Otherwise, it is using
+     physical addressing. */
+  svn_boolean_t use_log_addressing;
 
   /* Rev / pack file read granularity in bytes. */
   apr_int64_t block_size;
@@ -358,9 +353,6 @@ typedef struct fs_fs_data_t
      rep key (revision/offset) to svn_stringbuf_t. */
   svn_cache__t *fulltext_cache;
 
-  /* Revision property cache.  Maps from (rev,generation) to apr_hash_t. */
-  svn_cache__t *revprop_cache;
-
   /* Node properties cache.  Maps from rep key to apr_hash_t. */
   svn_cache__t *properties_cache;
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.c Tue Nov 25 16:26:48 2014
@@ -457,18 +457,18 @@ check_format(int format)
 
 /* Read the format number and maximum number of files per directory
    from PATH and return them in *PFORMAT, *MAX_FILES_PER_DIR and
-   MIN_LOG_ADDRESSING_REV respectively.
+   USE_LOG_ADDRESSIONG respectively.
 
    *MAX_FILES_PER_DIR is obtained from the 'layout' format option, and
    will be set to zero if a linear scheme should be used.
-   *MIN_LOG_ADDRESSING_REV is obtained from the 'addressing' format option,
-   and will be set to SVN_INVALID_REVNUM for physical addressing.
+   *USE_LOG_ADDRESSIONG is obtained from the 'addressing' format option,
+   and will be set to FALSE for physical addressing.
 
    Use POOL for temporary allocation. */
 static svn_error_t *
 read_format(int *pformat,
             int *max_files_per_dir,
-            svn_revnum_t *min_log_addressing_rev,
+            svn_boolean_t *use_log_addressing,
             const char *path,
             apr_pool_t *pool)
 {
@@ -515,7 +515,7 @@ read_format(int *pformat,
 
   /* Set the default values for anything that can be set via an option. */
   *max_files_per_dir = 0;
-  *min_log_addressing_rev = SVN_INVALID_REVNUM;
+  *use_log_addressing = FALSE;
 
   /* Read any options. */
   while (!eos)
@@ -547,18 +547,13 @@ read_format(int *pformat,
         {
           if (strcmp(buf->data + 11, "physical") == 0)
             {
-              *min_log_addressing_rev = SVN_INVALID_REVNUM;
+              *use_log_addressing = FALSE;
               continue;
             }
 
-          if (strncmp(buf->data + 11, "logical ", 8) == 0)
+          if (strcmp(buf->data + 11, "logical") == 0)
             {
-              int value;
-
-              /* Check that the argument is numeric. */
-              SVN_ERR(check_format_file_buffer_numeric(buf->data, 19, path, pool));
-              SVN_ERR(svn_cstring_atoi(&value, buf->data + 19));
-              *min_log_addressing_rev = value;
+              *use_log_addressing = TRUE;
               continue;
             }
         }
@@ -572,7 +567,7 @@ read_format(int *pformat,
    * If the format file is inconsistent in that respect, something
    * probably went wrong.
    */
-  if (*min_log_addressing_rev != SVN_INVALID_REVNUM && !*max_files_per_dir)
+  if (*use_log_addressing && !*max_files_per_dir)
     return svn_error_createf(SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL,
        _("'%s' specifies logical addressing for a non-sharded repository"),
        svn_dirent_local_style(path, pool));
@@ -610,13 +605,10 @@ svn_fs_fs__write_format(svn_fs_t *fs,
 
   if (ffd->format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
     {
-      if (ffd->min_log_addressing_rev == SVN_INVALID_REVNUM)
-        svn_stringbuf_appendcstr(sb, "addressing physical\n");
+      if (ffd->use_log_addressing)
+        svn_stringbuf_appendcstr(sb, "addressing logical\n");
       else
-        svn_stringbuf_appendcstr(sb,
-                                 apr_psprintf(pool,
-                                              "addressing logical %ld\n",
-                                              ffd->min_log_addressing_rev));
+        svn_stringbuf_appendcstr(sb, "addressing physical\n");
     }
 
   /* svn_io_write_version_file() does a load of magic to allow it to
@@ -1097,16 +1089,16 @@ svn_fs_fs__read_format_file(svn_fs_t *fs
 {
   fs_fs_data_t *ffd = fs->fsap_data;
   int format, max_files_per_dir;
-  svn_revnum_t min_log_addressing_rev;
+  svn_boolean_t use_log_addressing;
 
   /* Read info from format file. */
-  SVN_ERR(read_format(&format, &max_files_per_dir, &min_log_addressing_rev,
+  SVN_ERR(read_format(&format, &max_files_per_dir, &use_log_addressing,
                       path_format(fs, scratch_pool), scratch_pool));
 
   /* Now that we've got *all* info, store / update values in FFD. */
   ffd->format = format;
   ffd->max_files_per_dir = max_files_per_dir;
-  ffd->min_log_addressing_rev = min_log_addressing_rev;
+  ffd->use_log_addressing = use_log_addressing;
 
   return SVN_NO_ERROR;
 }
@@ -1169,15 +1161,13 @@ upgrade_body(void *baton, apr_pool_t *po
   svn_fs_t *fs = upgrade_baton->fs;
   fs_fs_data_t *ffd = fs->fsap_data;
   int format, max_files_per_dir;
-  svn_revnum_t min_log_addressing_rev;
+  svn_boolean_t use_log_addressing;
   const char *format_path = path_format(fs, pool);
   svn_node_kind_t kind;
   svn_boolean_t needs_revprop_shard_cleanup = FALSE;
-  svn_error_t* err;
-  const char *txns_dir;
 
   /* Read the FS format number and max-files-per-dir setting. */
-  SVN_ERR(read_format(&format, &max_files_per_dir, &min_log_addressing_rev,
+  SVN_ERR(read_format(&format, &max_files_per_dir, &use_log_addressing,
                       format_path, pool));
 
   /* If the config file does not exist, create one. */
@@ -1202,9 +1192,6 @@ upgrade_body(void *baton, apr_pool_t *po
   if (format == SVN_FS_FS__FORMAT_NUMBER)
     return SVN_NO_ERROR;
 
-  /* Remember the current 'transactions' dir path */
-  txns_dir = svn_fs_fs__path_txns_dir(fs, pool);
-
   /* If our filesystem predates the existence of the 'txn-current
      file', make that file and its corresponding lock file. */
   if (format < SVN_FS_FS__MIN_TXN_CURRENT_FORMAT)
@@ -1247,14 +1234,6 @@ upgrade_body(void *baton, apr_pool_t *po
                                                pool));
     }
 
-  if (   format < SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT
-      && max_files_per_dir > 0)
-    {
-      min_log_addressing_rev
-        = (ffd->youngest_rev_cache / max_files_per_dir + 1)
-        * max_files_per_dir;
-    }
-
   /* We will need the UUID info shortly ...
      Read it before the format bump as the UUID file still uses the old
      format. */
@@ -1264,37 +1243,20 @@ upgrade_body(void *baton, apr_pool_t *po
      down will use the format from FS to create missing info. */
   ffd->format = SVN_FS_FS__FORMAT_NUMBER;
   ffd->max_files_per_dir = max_files_per_dir;
-  ffd->min_log_addressing_rev = min_log_addressing_rev;
+  ffd->use_log_addressing = use_log_addressing;
 
   /* Always add / bump the instance ID such that no form of caching
      accidentally uses outdated information.  Keep the UUID. */
   SVN_ERR(svn_fs_fs__set_uuid(fs, fs->uuid, NULL, pool));
 
-  /* Rename the 'transactions' folder */
-  if (format < SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
-    SVN_ERR(svn_io_file_rename(txns_dir, svn_fs_fs__path_txns_dir(fs, pool),
-                               pool));
-
   /* Bump the format file. */
-  err = svn_fs_fs__write_format(fs, TRUE, pool);
-  if (err)
-    {
-      /* Something went wrong at the last minute.
-       * Undo the 'transactions' dir rename. */
-      if (format < SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
-        svn_error_compose(err,
-                          svn_io_file_rename(svn_fs_fs__path_txns_dir(fs,
-                                                                      pool),
-                                             txns_dir, pool));
+  SVN_ERR(svn_fs_fs__write_format(fs, TRUE, pool));
 
-      SVN_ERR(err);
-    }
-  else
-    if (upgrade_baton->notify_func)
-      SVN_ERR(upgrade_baton->notify_func(upgrade_baton->notify_baton,
-                                        SVN_FS_FS__FORMAT_NUMBER,
-                                        svn_fs_upgrade_format_bumped,
-                                        pool));
+  if (upgrade_baton->notify_func)
+    SVN_ERR(upgrade_baton->notify_func(upgrade_baton->notify_baton,
+                                       SVN_FS_FS__FORMAT_NUMBER,
+                                       svn_fs_upgrade_format_bumped,
+                                       pool));
 
   /* Now, it is safe to remove the redundant revprop files. */
   if (needs_revprop_shard_cleanup)
@@ -1607,7 +1569,7 @@ write_revision_zero(svn_fs_t *fs,
   svn_string_t date;
 
   /* Write out a rev file for revision 0. */
-  if (svn_fs_fs__use_log_addressing(fs, 0))
+  if (svn_fs_fs__use_log_addressing(fs))
     {
       apr_array_header_t *index_entries;
       svn_fs_fs__p2l_entry_t *entry;
@@ -1696,7 +1658,7 @@ svn_fs_fs__create_file_tree(svn_fs_t *fs
                             const char *path,
                             int format,
                             int shard_size,
-                            svn_revnum_t min_log_addressing_rev,
+                            svn_boolean_t use_log_addressing,
                             apr_pool_t *pool)
 {
   fs_fs_data_t *ffd = fs->fsap_data;
@@ -1712,9 +1674,9 @@ svn_fs_fs__create_file_tree(svn_fs_t *fs
 
   /* Select the addressing mode depending on the format. */
   if (format >= SVN_FS_FS__MIN_LOG_ADDRESSING_FORMAT)
-    ffd->min_log_addressing_rev = min_log_addressing_rev;
+    ffd->use_log_addressing = use_log_addressing;
   else
-    ffd->min_log_addressing_rev = SVN_INVALID_REVNUM;
+    ffd->use_log_addressing = FALSE;
 
   /* Create the revision data directories. */
   if (ffd->max_files_per_dir)
@@ -1797,6 +1759,7 @@ svn_fs_fs__create(svn_fs_t *fs,
 {
   int format = SVN_FS_FS__FORMAT_NUMBER;
   int shard_size = SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR;
+  svn_boolean_t log_addressing;
 
   /* Process the given filesystem config. */
   if (fs->config)
@@ -1844,8 +1807,13 @@ svn_fs_fs__create(svn_fs_t *fs,
         }
     }
 
+  log_addressing = svn_hash__get_bool(fs->config,
+                                      SVN_FS_CONFIG_FSFS_LOG_ADDRESSING,
+                                      TRUE);
+
   /* Actual FS creation. */
-  SVN_ERR(svn_fs_fs__create_file_tree(fs, path, format, shard_size, 0, pool));
+  SVN_ERR(svn_fs_fs__create_file_tree(fs, path, format, shard_size,
+                                      log_addressing, pool));
 
   /* This filesystem is ready.  Stamp it with a format number. */
   SVN_ERR(svn_fs_fs__write_format(fs, FALSE, pool));

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.h?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/fs_fs.h Tue Nov 25 16:26:48 2014
@@ -123,9 +123,9 @@ svn_error_t *svn_fs_fs__file_checksum(sv
 svn_boolean_t svn_fs_fs__fs_supports_mergeinfo(svn_fs_t *fs);
 
 /* Under the repository db PATH, create a FSFS repository with FORMAT,
- * the given SHARD_SIZE and start logical addressing at revision
- * MIN_LOG_ADDRESSING_REV.  If not supported by the respective format,
- * the latter two parameters will be ignored.  FS will be updated.
+ * the given SHARD_SIZE. If USE_LOG_ADDRESSING is non-zero, repository
+ * will use logical addressing. If not supported by the respective format,
+ * the latter two parameters will be ignored. FS will be updated.
  *
  * The only file not being written is the 'format' file.  This allows
  * callers such as hotcopy to modify the contents before turning the
@@ -138,7 +138,7 @@ svn_fs_fs__create_file_tree(svn_fs_t *fs
                             const char *path,
                             int format,
                             int shard_size,
-                            svn_revnum_t min_log_addressing_rev,
+                            svn_boolean_t use_log_addressing,
                             apr_pool_t *pool);
 
 /* Create a fs_fs fileysystem referenced by FS at path PATH.  Get any

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/hotcopy.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/hotcopy.c Tue Nov 25 16:26:48 2014
@@ -1025,7 +1025,7 @@ hotcopy_create_empty_dest(svn_fs_t *src_
   /* Create the DST_FS repository with the same layout as SRC_FS. */
   SVN_ERR(svn_fs_fs__create_file_tree(dst_fs, dst_path, src_ffd->format,
                                       src_ffd->max_files_per_dir,
-                                      src_ffd->min_log_addressing_rev,
+                                      src_ffd->use_log_addressing,
                                       pool));
 
   /* Copy the UUID.  Hotcopy destination receives a new instance ID, but

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/index.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/index.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/index.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/index.c Tue Nov 25 16:26:48 2014
@@ -228,13 +228,15 @@ stream_error_create(svn_fs_fs__packed_nu
                     const char *message)
 {
   const char *file_name;
-  apr_off_t offset = 0;
+  apr_off_t offset;
   SVN_ERR(svn_io_file_name_get(&file_name, stream->file,
                                stream->pool));
-  SVN_ERR(svn_io_file_seek(stream->file, APR_CUR, &offset, stream->pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&offset, stream->file, stream->pool));
 
   return svn_error_createf(err, NULL, message, file_name,
-                           (apr_uint64_t)offset);
+                           apr_psprintf(stream->pool,
+                                        "%" APR_UINT64_T_HEX_FMT,
+                                        (apr_uint64_t)offset));
 }
 
 /* Read up to MAX_NUMBER_PREFETCH numbers from the STREAM->NEXT_OFFSET in
@@ -283,7 +285,7 @@ packed_stream_read(svn_fs_fs__packed_num
   err = apr_file_read(stream->file, buffer, &read);
   if (err && !APR_STATUS_IS_EOF(err))
     return stream_error_create(stream, err,
-      _("Can't read index file '%s' at offset 0x%" APR_UINT64_T_HEX_FMT));
+      _("Can't read index file '%s' at offset 0x%s"));
 
   /* if the last number is incomplete, trim it from the buffer */
   while (read > 0 && buffer[read-1] >= 0x80)
@@ -293,7 +295,7 @@ packed_stream_read(svn_fs_fs__packed_num
    * at least *one* further number. */
   if SVN__PREDICT_FALSE(read == 0)
     return stream_error_create(stream, err,
-      _("Unexpected end of index file %s at offset 0x%"APR_UINT64_T_HEX_FMT));
+      _("Unexpected end of index file %s at offset 0x%s"));
 
   /* parse file buffer and expand into stream buffer */
   target = stream->buffer;
@@ -1776,7 +1778,7 @@ svn_fs_fs__item_offset(apr_off_t *absolu
   svn_error_t *err = SVN_NO_ERROR;
   if (txn_id)
     {
-      if (svn_fs_fs__use_log_addressing(fs, txn_id->revision + 1))
+      if (svn_fs_fs__use_log_addressing(fs))
         {
           /* the txn is going to produce a rev with logical addressing.
              So, we need to get our info from the (proto) index file. */
@@ -1789,7 +1791,7 @@ svn_fs_fs__item_offset(apr_off_t *absolu
           *absolute_position = item_index;
         }
     }
-  else if (svn_fs_fs__use_log_addressing(fs, revision))
+  else if (svn_fs_fs__use_log_addressing(fs))
     {
       /* ordinary index lookup */
       SVN_ERR(l2p_index_lookup(absolute_position, fs, rev_file, revision,

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/load-index.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/load-index.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/load-index.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/load-index.c Tue Nov 25 16:26:48 2014
@@ -37,7 +37,7 @@ svn_fs_fs__load_index(svn_fs_t *fs,
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
 
   /* Check the FS format number. */
-  if (! svn_fs_fs__use_log_addressing(fs, revision))
+  if (! svn_fs_fs__use_log_addressing(fs))
     return svn_error_create(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL, NULL);
 
   /* Treat an empty array as a no-op instead error. */

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.c Tue Nov 25 16:26:48 2014
@@ -478,8 +478,8 @@ copy_item_to_temp(pack_context_t *contex
 {
   svn_fs_fs__p2l_entry_t *new_entry
     = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  new_entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(temp_file, APR_CUR, &new_entry->offset, pool));
+
+  SVN_ERR(svn_fs_fs__get_file_offset(&new_entry->offset, temp_file, pool));
   APR_ARRAY_PUSH(entries, svn_fs_fs__p2l_entry_t *) = new_entry;
   
   SVN_ERR(copy_file_data(context, temp_file, rev_file, entry->size, pool));
@@ -566,9 +566,7 @@ copy_rep_to_temp(pack_context_t *context
   /* create a copy of ENTRY, make it point to the copy destination and
    * store it in CONTEXT */
   entry = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR, &entry->offset,
-                           pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&entry->offset, context->reps_file, pool));
   add_item_rep_mapping(context, entry);
 
   /* read & parse the representation header */
@@ -645,12 +643,11 @@ compare_dir_entries_format6(const svn_so
 apr_array_header_t *
 svn_fs_fs__order_dir_entries(svn_fs_t *fs,
                              apr_hash_t *directory,
-                             svn_revnum_t revision,
                              apr_pool_t *pool)
 {
   apr_array_header_t *ordered
     = svn_sort__hash(directory,
-                     svn_fs_fs__use_log_addressing(fs, revision)
+                     svn_fs_fs__use_log_addressing(fs)
                        ? compare_dir_entries_format7
                        : compare_dir_entries_format6,
                      pool);
@@ -722,9 +719,8 @@ copy_node_to_temp(pack_context_t *contex
   /* create a copy of ENTRY, make it point to the copy destination and
    * store it in CONTEXT */
   entry = apr_pmemdup(context->info_pool, entry, sizeof(*entry));
-  entry->offset = 0;
-  SVN_ERR(svn_io_file_seek(context->reps_file, APR_CUR,
-                           &entry->offset, pool));
+  SVN_ERR(svn_fs_fs__get_file_offset(&entry->offset, context->reps_file,
+                                     pool));
   add_item_rep_mapping(context, entry);
 
   /* copy the noderev to our temp file */
@@ -1753,7 +1749,7 @@ pack_rev_shard(svn_fs_t *fs,
   SVN_ERR(svn_io_dir_make(pack_file_dir, APR_OS_DEFAULT, pool));
 
   /* Index information files */
-  if (svn_fs_fs__use_log_addressing(fs, shard_rev))
+  if (svn_fs_fs__use_log_addressing(fs))
     SVN_ERR(pack_log_addressed(fs, pack_file_dir, shard_path, shard_rev,
                                max_mem, cancel_func, cancel_baton, pool));
   else

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.h?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.h (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/pack.h Tue Nov 25 16:26:48 2014
@@ -52,13 +52,11 @@ svn_fs_fs__get_packed_offset(apr_off_t *
 
 /* Return the svn_dir_entry_t* objects of DIRECTORY in an APR array
  * allocated in POOL with entries added in storage (on-disk) order.
- * FS format and the directory's REVISION number will be used to pick
- * the optimal ordering strategy.
+ * FS format will be used to pick the optimal ordering strategy.
  */
 apr_array_header_t *
 svn_fs_fs__order_dir_entries(svn_fs_t *fs,
                              apr_hash_t *directory,
-                             svn_revnum_t revision,
                              apr_pool_t *pool);
 
 

Modified: subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c?rev=1641647&r1=1641646&r2=1641647&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c (original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_fs_fs/revprops.c Tue Nov 25 16:26:48 2014
@@ -135,20 +135,6 @@ svn_fs_fs__upgrade_cleanup_pack_revprops
   return SVN_NO_ERROR;
 }
 
-/* Test whether revprop cache and necessary infrastructure are
-   available in FS. */
-static svn_boolean_t
-has_revprop_cache(svn_fs_t *fs, apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  /* is the cache (still) enabled? */
-  if (ffd->revprop_cache == NULL)
-    return FALSE;
-
-  return FALSE;
-}
-
 /* Container for all data required to access the packed revprop file
  * for a given REVISION.  This structure will be filled incrementally
  * by read_pack_revprops() its sub-routines.
@@ -223,16 +209,6 @@ parse_revprop(apr_hash_t **properties,
   *properties = apr_hash_make(pool);
 
   SVN_ERR(svn_hash_read2(*properties, stream, SVN_HASH_TERMINATOR, pool));
-  if (has_revprop_cache(fs, pool))
-    {
-      fs_fs_data_t *ffd = fs->fsap_data;
-      pair_cache_key_t key = { 0 };
-
-      key.revision = revision;
-      key.second = generation;
-      SVN_ERR(svn_cache__set(ffd->revprop_cache, &key, *properties,
-                             scratch_pool));
-    }
 
   return SVN_NO_ERROR;
 }
@@ -697,7 +673,6 @@ write_non_packed_revprop(const char **fi
  * file at TMP_PATH to FINAL_PATH and give it the permissions from
  * PERMS_REFERENCE.
  *
- * If indicated in BUMP_GENERATION, increase FS' revprop generation.
  * Finally, delete all the temporary files given in FILES_TO_DELETE.
  * The latter may be NULL.
  *
@@ -709,7 +684,6 @@ switch_to_new_revprop(svn_fs_t *fs,
                       const char *tmp_path,
                       const char *perms_reference,
                       apr_array_header_t *files_to_delete,
-                      svn_boolean_t bump_generation,
                       apr_pool_t *pool)
 {
   SVN_ERR(svn_fs_fs__move_into_place(tmp_path, final_path, perms_reference,
@@ -1065,7 +1039,6 @@ svn_fs_fs__set_revision_proplist(svn_fs_
                                  apr_pool_t *pool)
 {
   svn_boolean_t is_packed;
-  svn_boolean_t bump_generation = FALSE;
   const char *final_path;
   const char *tmp_path;
   const char *perms_reference;
@@ -1076,24 +1049,6 @@ svn_fs_fs__set_revision_proplist(svn_fs_
   /* this info will not change while we hold the global FS write lock */
   is_packed = svn_fs_fs__is_packed_revprop(fs, rev);
 
-  /* Test whether revprops already exist for this revision.
-   * Only then will we need to bump the revprop generation. */
-  if (has_revprop_cache(fs, pool))
-    {
-      if (is_packed)
-        {
-          bump_generation = TRUE;
-        }
-      else
-        {
-          svn_node_kind_t kind;
-          SVN_ERR(svn_io_check_path(svn_fs_fs__path_revprops(fs, rev, pool),
-                                    &kind,
-                                    pool));
-          bump_generation = kind != svn_node_none;
-        }
-    }
-
   /* Serialize the new revprop data */
   if (is_packed)
     SVN_ERR(write_packed_revprop(&final_path, &tmp_path, &files_to_delete,
@@ -1111,7 +1066,7 @@ svn_fs_fs__set_revision_proplist(svn_fs_
 
   /* Now, switch to the new revprop data. */
   SVN_ERR(switch_to_new_revprop(fs, final_path, tmp_path, perms_reference,
-                                files_to_delete, bump_generation, pool));
+                                files_to_delete, pool));
 
   return SVN_NO_ERROR;
 }



Mime
View raw message