You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/06/05 11:22:51 UTC

svn commit: r1489765 [7/22] - in /subversion/branches/verify-keep-going: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/server-side/fsfsfixer/fixer/ notes/ subversion/...

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/mergeinfo.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/mergeinfo.c Wed Jun  5 09:22:43 2013
@@ -1507,10 +1507,6 @@ logs_for_mergeinfo_rangelist(const char 
   if (! rangelist->nelts)
     return SVN_NO_ERROR;
 
-  /* Sort the rangelist. */
-  qsort(rangelist->elts, rangelist->nelts,
-        rangelist->elt_size, svn_sort_compare_ranges);
-
   /* Build a single-member log target list using SOURCE_URL. */
   target = apr_array_make(scratch_pool, 1, sizeof(const char *));
   APR_ARRAY_PUSH(target, const char *) = source_url;
@@ -1651,11 +1647,11 @@ svn_client_mergeinfo_get_merged(apr_hash
   return SVN_NO_ERROR;
 }
 
-
 svn_error_t *
-svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
+svn_client__mergeinfo_log(svn_boolean_t finding_merged,
                           const char *target_path_or_url,
                           const svn_opt_revision_t *target_peg_revision,
+                          svn_mergeinfo_catalog_t *target_mergeinfo_catalog,
                           const char *source_path_or_url,
                           const svn_opt_revision_t *source_peg_revision,
                           const svn_opt_revision_t *source_start_revision,
@@ -1666,12 +1662,15 @@ svn_client_mergeinfo_log2(svn_boolean_t 
                           svn_depth_t depth,
                           const apr_array_header_t *revprops,
                           svn_client_ctx_t *ctx,
+                          apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool)
 {
   const char *log_target = NULL;
   const char *repos_root;
   const char *target_repos_relpath;
   svn_mergeinfo_catalog_t target_mergeinfo_cat;
+  svn_ra_session_t *target_session = NULL;
+  svn_client__pathrev_t *pathrev;
 
   /* A hash of paths, at or under TARGET_PATH_OR_URL, mapped to
      rangelists.  Not technically mergeinfo, so not using the
@@ -1688,6 +1687,7 @@ svn_client_mergeinfo_log2(svn_boolean_t 
   apr_hash_index_t *hi;
   apr_pool_t *iterpool;
   svn_boolean_t oldest_revs_first = TRUE;
+  apr_pool_t *subpool;
 
   /* We currently only support depth = empty | infinity. */
   if (depth != svn_depth_infinity && depth != svn_depth_empty)
@@ -1706,9 +1706,14 @@ svn_client_mergeinfo_log2(svn_boolean_t 
         (source_end_revision->kind == svn_opt_revision_date) ||
         (source_end_revision->kind == svn_opt_revision_head)))
     return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+  if ((source_end_revision->kind != svn_opt_revision_unspecified)
+      && (source_start_revision->kind == svn_opt_revision_unspecified))
+    return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
   if ((source_end_revision->kind == svn_opt_revision_unspecified)
       && (source_start_revision->kind != svn_opt_revision_unspecified))
-    source_end_revision = source_start_revision;
+    return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+
+  subpool = svn_pool_create(scratch_pool);
 
   /* We need the union of TARGET_PATH_OR_URL@TARGET_PEG_REVISION's mergeinfo
      and MERGE_SOURCE_URL's history.  It's not enough to do path
@@ -1717,10 +1722,45 @@ svn_client_mergeinfo_log2(svn_boolean_t 
      the target, that vastly simplifies matters (we'll have nothing to
      do). */
   /* This get_mergeinfo() call doubles as a mergeinfo capabilities check. */
-  SVN_ERR(get_mergeinfo(&target_mergeinfo_cat, &repos_root,
-                        target_path_or_url, target_peg_revision,
-                        depth == svn_depth_infinity, TRUE,
-                        ctx, scratch_pool, scratch_pool));
+  if (target_mergeinfo_catalog)
+    {
+      if (*target_mergeinfo_catalog)
+        {
+          /* The caller provided the mergeinfo catalog for
+             TARGET_PATH_OR_URL, so we don't need to accquire
+             it ourselves.  We do need to get the repos_root
+             though, because get_mergeinfo() won't do it for us. */
+          target_mergeinfo_cat = *target_mergeinfo_catalog;
+          SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev,
+                                                    target_path_or_url, NULL,
+                                                    target_peg_revision,
+                                                    target_peg_revision,
+                                                    ctx, subpool));
+          SVN_ERR(svn_ra_get_repos_root2(target_session, &repos_root,
+                                         scratch_pool));
+        }
+      else
+        {
+          /* The caller didn't provide the mergeinfo catalog for
+             TARGET_PATH_OR_URL, but wants us to pass a copy back
+             when we get it, so use RESULT_POOL. */
+          SVN_ERR(get_mergeinfo(target_mergeinfo_catalog, &repos_root,
+                                target_path_or_url, target_peg_revision,
+                                depth == svn_depth_infinity, TRUE,
+                                ctx, result_pool, scratch_pool));
+          target_mergeinfo_cat = *target_mergeinfo_catalog;
+        }
+    }
+  else
+    {
+      /* The caller didn't provide the mergeinfo catalog for
+         TARGET_PATH_OR_URL, nor does it want a copy, so we can use
+         nothing but SCRATCH_POOL. */
+      SVN_ERR(get_mergeinfo(&target_mergeinfo_cat, &repos_root,
+                            target_path_or_url, target_peg_revision,
+                            depth == svn_depth_infinity, TRUE,
+                            ctx, scratch_pool, scratch_pool));
+    }
 
   if (!svn_path_is_url(target_path_or_url))
     {
@@ -1739,7 +1779,7 @@ svn_client_mergeinfo_log2(svn_boolean_t 
 
       /* TARGET_REPOS_REL should be non-NULL, else get_mergeinfo
          should have failed.  */
-      SVN_ERR_ASSERT(target_repos_relpath != NULL); 
+      SVN_ERR_ASSERT(target_repos_relpath != NULL);
     }
 
   if (!target_mergeinfo_cat)
@@ -1752,6 +1792,7 @@ svn_client_mergeinfo_log2(svn_boolean_t 
          history. */
       if (finding_merged)
         {
+          svn_pool_destroy(subpool);
           return SVN_NO_ERROR;
         }
       else
@@ -1769,18 +1810,17 @@ svn_client_mergeinfo_log2(svn_boolean_t 
    * ### TODO: As the source and target must be in the same repository, we
    * should share a single session, tracking the two URLs separately. */
   {
-    apr_pool_t *sesspool = svn_pool_create(scratch_pool);
-    svn_ra_session_t *source_session, *target_session;
-    svn_client__pathrev_t *pathrev;
+    svn_ra_session_t *source_session;
     svn_revnum_t start_rev, end_rev, youngest_rev = SVN_INVALID_REVNUM;
-    
+
     if (! finding_merged)
       {
-        SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev,
-                                                  target_path_or_url, NULL,
-                                                  target_peg_revision,
-                                                  target_peg_revision,
-                                                  ctx, sesspool));
+        if (!target_session)
+          SVN_ERR(svn_client__ra_session_from_path2(&target_session, &pathrev,
+                                                    target_path_or_url, NULL,
+                                                    target_peg_revision,
+                                                    target_peg_revision,
+                                                    ctx, subpool));
         SVN_ERR(svn_client__get_history_as_mergeinfo(&target_history, NULL,
                                                      pathrev,
                                                      SVN_INVALID_REVNUM,
@@ -1788,22 +1828,22 @@ svn_client_mergeinfo_log2(svn_boolean_t 
                                                      target_session, ctx,
                                                      scratch_pool));
       }
-    
+
     SVN_ERR(svn_client__ra_session_from_path2(&source_session, &pathrev,
                                               source_path_or_url, NULL,
                                               source_peg_revision,
                                               source_peg_revision,
-                                              ctx, sesspool));
+                                              ctx, subpool));
     SVN_ERR(svn_client__get_revision_number(&start_rev, &youngest_rev,
                                             ctx->wc_ctx, source_path_or_url,
                                             source_session,
                                             source_start_revision,
-                                            sesspool));
+                                            subpool));
     SVN_ERR(svn_client__get_revision_number(&end_rev, &youngest_rev,
                                             ctx->wc_ctx, source_path_or_url,
                                             source_session,
                                             source_end_revision,
-                                            sesspool));
+                                            subpool));
     SVN_ERR(svn_client__get_history_as_mergeinfo(&source_history, NULL,
                                                  pathrev,
                                                  MAX(end_rev, start_rev),
@@ -1814,7 +1854,7 @@ svn_client_mergeinfo_log2(svn_boolean_t 
       oldest_revs_first = FALSE;
 
     /* Close the source and target sessions. */
-    svn_pool_destroy(sesspool);
+    svn_pool_destroy(subpool);
   }
 
   /* Separate the explicit or inherited mergeinfo on TARGET_PATH_OR_URL,
@@ -2087,6 +2127,31 @@ svn_client_mergeinfo_log2(svn_boolean_t 
 }
 
 svn_error_t *
+svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
+                          const char *target_path_or_url,
+                          const svn_opt_revision_t *target_peg_revision,
+                          const char *source_path_or_url,
+                          const svn_opt_revision_t *source_peg_revision,
+                          const svn_opt_revision_t *source_start_revision,
+                          const svn_opt_revision_t *source_end_revision,
+                          svn_log_entry_receiver_t log_receiver,
+                          void *log_receiver_baton,
+                          svn_boolean_t discover_changed_paths,
+                          svn_depth_t depth,
+                          const apr_array_header_t *revprops,
+                          svn_client_ctx_t *ctx,
+                          apr_pool_t *scratch_pool)
+{
+  return svn_client__mergeinfo_log(finding_merged, target_path_or_url,
+                                   target_peg_revision, NULL,
+                                   source_path_or_url, source_peg_revision,
+                                   source_start_revision, source_end_revision,
+                                   log_receiver, log_receiver_baton,
+                                   discover_changed_paths, depth, revprops,
+                                   ctx, scratch_pool, scratch_pool);
+}
+
+svn_error_t *
 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
                                  const char *path_or_url,
                                  const svn_opt_revision_t *peg_revision,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/patch.c Wed Jun  5 09:22:43 2013
@@ -321,6 +321,7 @@ obtain_eol_and_keywords_for_file(apr_has
       const char *rev_str;
       const char *author;
       const char *url;
+      const char *root_url;
 
       SVN_ERR(svn_wc__node_get_changed_info(&changed_rev,
                                             &changed_date,
@@ -332,9 +333,12 @@ obtain_eol_and_keywords_for_file(apr_has
       SVN_ERR(svn_wc__node_get_url(&url, wc_ctx,
                                    local_abspath,
                                    scratch_pool, scratch_pool));
-      SVN_ERR(svn_subst_build_keywords2(keywords,
+      SVN_ERR(svn_wc__node_get_repos_info(NULL, NULL, &root_url, NULL,
+                                          wc_ctx, local_abspath,
+                                          scratch_pool, scratch_pool));
+      SVN_ERR(svn_subst_build_keywords3(keywords,
                                         keywords_val->data,
-                                        rev_str, url, changed_date,
+                                        rev_str, url, root_url, changed_date,
                                         author, result_pool));
     }
 
@@ -2272,7 +2276,7 @@ apply_one_patch(patch_target_t **patch_t
        * will be closed later in write_out_rejected_hunks(). */
       if (target->kind_on_disk == svn_node_file)
         SVN_ERR(svn_io_file_close(target->file, scratch_pool));
-  
+
       SVN_ERR(svn_io_file_close(target->patched_file, scratch_pool));
     }
 
@@ -2822,13 +2826,13 @@ check_ancestor_delete(const char *delete
       cb.local_abspath = dir_abspath;
       cb.must_keep = FALSE;
       cb.targets_info = targets_info;
-    
+
       err = svn_wc_walk_status(ctx->wc_ctx, dir_abspath, svn_depth_infinity,
                                TRUE, FALSE, FALSE, NULL,
                                can_delete_callback, &cb,
                                ctx->cancel_func, ctx->cancel_baton,
                                iterpool);
-    
+
       if (err)
         {
           if (err->apr_err != SVN_ERR_CEASE_INVOCATION)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/prop_commands.c Wed Jun  5 09:22:43 2013
@@ -587,6 +587,9 @@ remote_propget(apr_hash_t *props,
   if (inherited_props)
     {
       const char *repos_root_url;
+      int i;
+      apr_array_header_t *final_iprops =
+        apr_array_make(result_pool, 1, sizeof(svn_prop_inherited_item_t *));
 
       /* We will filter out all but PROPNAME later, making a final copy
          in RESULT_POOL, so pass SCRATCH_POOL for all pools. */
@@ -599,15 +602,8 @@ remote_propget(apr_hash_t *props,
                                                  repos_root_url,
                                                  scratch_pool,
                                                  scratch_pool));
-    }
-
-  /* Make a copy of any inherited PROPNAME properties in RESULT_POOL. */
-  if (inherited_props)
-    {
-      int i;
-      apr_array_header_t *final_iprops =
-        apr_array_make(result_pool, 1, sizeof(svn_prop_inherited_item_t *));
 
+      /* Make a copy of any inherited PROPNAME properties in RESULT_POOL. */
       for (i = 0; i < (*inherited_props)->nelts; i++)
         {
           svn_prop_inherited_item_t *iprop =
@@ -1042,7 +1038,7 @@ call_receiver(const char *path,
  *
  * The 'path' and keys for 'prop_hash' and 'inherited_prop' arguments to
  * RECEIVER are all URLs.
- * 
+ *
  * RESULT_POOL is used to allocated the 'path', 'prop_hash', and
  * 'inherited_prop' arguments to RECEIVER.  SCRATCH_POOL is used for all
  * other (temporary) allocations.
@@ -1131,9 +1127,9 @@ remote_proplist(const char *target_prefi
           const char *name = svn__apr_hash_index_key(hi);
           apr_ssize_t klen = svn__apr_hash_index_klen(hi);
           svn_prop_kind_t prop_kind;
-    
+
           prop_kind = svn_property_kind2(name);
-    
+
           if (prop_kind != svn_prop_regular_kind)
             {
               apr_hash_set(prop_hash, name, klen, NULL);
@@ -1237,7 +1233,7 @@ recursive_proplist_receiver(void *baton,
 /* Helper for svn_client_proplist4 when retrieving properties and/or
    inherited properties from the repository.  Except as noted below,
    all arguments are as per svn_client_proplist4.
-   
+
    GET_EXPLICIT_PROPS controls if explicit props are retrieved. */
 static svn_error_t *
 get_remote_props(const char *path_or_url,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/ra.c Wed Jun  5 09:22:43 2013
@@ -158,7 +158,7 @@ push_wc_prop(void *baton,
   if (! cb->commit_items)
     return svn_error_createf
       (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
-       _("Attempt to set wc property '%s' on '%s' in a non-commit operation"),
+       _("Attempt to set wcprop '%s' on '%s' in a non-commit operation"),
        name, svn_dirent_local_style(relpath, pool));
 
   for (i = 0; i < cb->commit_items->nelts; i++)
@@ -447,39 +447,14 @@ svn_client_open_ra_session2(svn_ra_sessi
                                                   scratch_pool));
 }
 
-
-
-
-/* Given PATH_OR_URL, which contains either a working copy path or an
-   absolute URL, a peg revision PEG_REVISION, and a desired revision
-   REVISION, find the path at which that object exists in REVISION,
-   following copy history if necessary.  If REVISION is younger than
-   PEG_REVISION, then check that PATH_OR_URL is the same node in both
-   PEG_REVISION and REVISION, and return @c
-   SVN_ERR_CLIENT_UNRELATED_RESOURCES if it is not the same node.
-
-   If PEG_REVISION->kind is 'unspecified', the peg revision is 'head'
-   for a URL or 'working' for a WC path.  If REVISION->kind is
-   'unspecified', the operative revision is the peg revision.
-
-   Store the actual location of the object in *RESOLVED_LOC_P.
-
-   RA_SESSION should be an open RA session pointing at the URL of
-   PATH_OR_URL, or NULL, in which case this function will open its own
-   temporary session.
-
-   Use authentication baton cached in CTX to authenticate against the
-   repository.
-
-   Use POOL for all allocations. */
-static svn_error_t *
-resolve_rev_and_url(svn_client__pathrev_t **resolved_loc_p,
-                    svn_ra_session_t *ra_session,
-                    const char *path_or_url,
-                    const svn_opt_revision_t *peg_revision,
-                    const svn_opt_revision_t *revision,
-                    svn_client_ctx_t *ctx,
-                    apr_pool_t *pool)
+svn_error_t *
+svn_client__resolve_rev_and_url(svn_client__pathrev_t **resolved_loc_p,
+                                svn_ra_session_t *ra_session,
+                                const char *path_or_url,
+                                const svn_opt_revision_t *peg_revision,
+                                const svn_opt_revision_t *revision,
+                                svn_client_ctx_t *ctx,
+                                apr_pool_t *pool)
 {
   svn_opt_revision_t peg_rev = *peg_revision;
   svn_opt_revision_t start_rev = *revision;
@@ -545,9 +520,9 @@ svn_client__ra_session_from_path2(svn_ra
   if (corrected_url && svn_path_is_url(path_or_url))
     path_or_url = corrected_url;
 
-  SVN_ERR(resolve_rev_and_url(&resolved_loc, ra_session,
-                              path_or_url, peg_revision, revision,
-                              ctx, pool));
+  SVN_ERR(svn_client__resolve_rev_and_url(&resolved_loc, ra_session,
+                                          path_or_url, peg_revision, revision,
+                                          ctx, pool));
 
   /* Make the session point to the real URL. */
   SVN_ERR(svn_ra_reparent(ra_session, resolved_loc->url, pool));
@@ -1009,9 +984,9 @@ svn_client__youngest_common_ancestor(con
                                             path_or_url1, NULL,
                                             revision1, revision1,
                                             ctx, sesspool));
-  SVN_ERR(resolve_rev_and_url(&loc2, session,
-                              path_or_url2, revision2, revision2,
-                              ctx, scratch_pool));
+  SVN_ERR(svn_client__resolve_rev_and_url(&loc2, session,
+                                          path_or_url2, revision2, revision2,
+                                          ctx, scratch_pool));
 
   SVN_ERR(svn_client__get_youngest_common_ancestor(
             &ancestor, loc1, loc2, session, ctx, result_pool, scratch_pool));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/repos_diff.c Wed Jun  5 09:22:43 2013
@@ -328,7 +328,7 @@ get_file_from_ra(struct file_baton *fb,
                                      fb->pool, scratch_pool));
 
       fstream = svn_stream_checksummed2(fstream, NULL, &fb->start_md5_checksum,
-                                        svn_checksum_md5, TRUE, scratch_pool);
+                                        svn_checksum_md5, TRUE, fb->pool);
 
       /* Retrieve the file and its properties */
       SVN_ERR(svn_ra_get_file(fb->edit_baton->ra_session,
@@ -843,6 +843,37 @@ window_handler(svn_txdelta_window_t *win
   return SVN_NO_ERROR;
 }
 
+/* Implements svn_stream_lazyopen_func_t. */
+static svn_error_t *
+lazy_open_source(svn_stream_t **stream,
+                 void *baton,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  struct file_baton *fb = baton;
+
+  SVN_ERR(svn_stream_open_readonly(stream, fb->path_start_revision,
+                                   result_pool, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Implements svn_stream_lazyopen_func_t. */
+static svn_error_t *
+lazy_open_result(svn_stream_t **stream,
+                 void *baton,
+                 apr_pool_t *result_pool,
+                 apr_pool_t *scratch_pool)
+{
+  struct file_baton *fb = baton;
+
+  SVN_ERR(svn_stream_open_unique(stream, &fb->path_end_revision, NULL,
+                                 svn_io_file_del_on_pool_cleanup,
+                                 result_pool, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* An svn_delta_editor_t function.  */
 static svn_error_t *
 apply_textdelta(void *file_baton,
@@ -902,14 +933,13 @@ apply_textdelta(void *file_baton,
     }
 
   /* Open the file to be used as the base for second revision */
-  SVN_ERR(svn_stream_open_readonly(&src_stream, fb->path_start_revision,
-                                   scratch_pool, scratch_pool));
+  src_stream = svn_stream_lazyopen_create(lazy_open_source, fb, TRUE,
+                                          scratch_pool);
 
   /* Open the file that will become the second revision after applying the
      text delta, it starts empty */
-  SVN_ERR(svn_stream_open_unique(&result_stream, &fb->path_end_revision, NULL,
-                                 svn_io_file_del_on_pool_cleanup,
-                                 scratch_pool, scratch_pool));
+  result_stream = svn_stream_lazyopen_create(lazy_open_result, fb, TRUE,
+                                             scratch_pool);
 
   svn_txdelta_apply(src_stream,
                     result_stream,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/status.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/status.c Wed Jun  5 09:22:43 2013
@@ -372,10 +372,10 @@ svn_client_status5(svn_revnum_t *result_
          if necessary */
 
       svn_node_kind_t kind;
- 
+
       SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, target_abspath,
                                 TRUE, FALSE, pool));
- 
+
       /* Dir must be a working copy directory or the status editor fails */
       if (kind == svn_node_dir)
         {
@@ -388,7 +388,7 @@ svn_client_status5(svn_revnum_t *result_
           dir_abspath = svn_dirent_dirname(target_abspath, pool);
           target_basename = svn_dirent_basename(target_abspath, NULL);
           dir = svn_dirent_dirname(path, pool);
- 
+
           if (kind == svn_node_file)
             {
               if (depth == svn_depth_empty)
@@ -398,9 +398,9 @@ svn_client_status5(svn_revnum_t *result_
             {
               err = svn_wc_read_kind2(&kind, ctx->wc_ctx, dir_abspath,
                                       FALSE, FALSE, pool);
- 
+
               svn_error_clear(err);
- 
+
               if (err || kind != svn_node_dir)
                 {
                   return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/switch.c Wed Jun  5 09:22:43 2013
@@ -245,7 +245,7 @@ switch_internal(svn_revnum_t *result_rev
     }
 
   wcroot_iprops = apr_hash_make(pool);
-  
+
   /* Will the base of LOCAL_ABSPATH require an iprop cache post-switch?
      If we are switching LOCAL_ABSPATH to the root of the repository then
      we don't need to cache inherited properties.  In all other cases we
@@ -259,7 +259,7 @@ switch_internal(svn_revnum_t *result_rev
                                 pool));
 
       /* Switching the WC root to anything but the repos root means
-         we need an iprop cache. */ 
+         we need an iprop cache. */
       if (!wc_root)
         {
           /* We know we are switching a subtree to something other than the
@@ -340,8 +340,8 @@ switch_internal(svn_revnum_t *result_rev
   *timestamp_sleep = TRUE;
 
   /* Drive the reporter structure, describing the revisions within
-     PATH.  When we call reporter->finish_report, the update_editor
-     will be driven by svn_repos_dir_delta2. */
+     LOCAL_ABSPATH.  When this calls reporter->finish_report, the
+     reporter will drive the switch_editor. */
   SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx, local_abspath, reporter,
                                   report_baton, TRUE,
                                   depth, (! depth_is_sticky),

Modified: subversion/branches/verify-keep-going/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_client/update.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_client/update.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_client/update.c Wed Jun  5 09:22:43 2013
@@ -454,8 +454,8 @@ update_internal(svn_revnum_t *result_rev
   *timestamp_sleep = TRUE;
 
   /* Drive the reporter structure, describing the revisions within
-     PATH.  When we call reporter->finish_report, the
-     update_editor will be driven by svn_repos_dir_delta2. */
+     LOCAL_ABSPATH.  When this calls reporter->finish_report, the
+     reporter will drive the update_editor. */
   SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx, local_abspath, reporter,
                                   report_baton, TRUE,
                                   depth, (! depth_is_sticky),

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/compose_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/compose_delta.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/compose_delta.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/compose_delta.c Wed Jun  5 09:22:43 2013
@@ -648,15 +648,17 @@ copy_source_ops(apr_size_t offset, apr_s
     {
       const svn_txdelta_op_t *const op = &window->ops[op_ndx];
       const apr_size_t *const off = &ndx->offs[op_ndx];
-      apr_size_t fix_offset;
-      apr_size_t fix_limit;
+      const apr_size_t fix_offset = (offset > off[0] ? offset - off[0] : 0);
+      const apr_size_t fix_limit = (off[1] > limit ? off[1] - limit : 0);
 
+      /* Ideally, we'd do this check before assigning fix_offset and
+         fix_limit; but then we couldn't make them const whilst still
+         adhering to C90 rules. Instead, we're going to assume that a
+         smart optimizing compiler will reorder this check before the
+         local variable initialization. */
       if (off[0] >= limit)
           break;
 
-      fix_offset = (offset > off[0] ? offset - off[0] : 0);
-      fix_limit = (off[1] > limit ? off[1] - limit : 0);
-
       /* It would be extremely weird if the fixed-up op had zero length. */
       assert(fix_offset + fix_limit < op->length);
 
@@ -701,23 +703,22 @@ copy_source_ops(apr_size_t offset, apr_s
               apr_size_t tgt_off = target_offset;
               assert(ptn_length > ptn_overlap);
 
-              /* ### FIXME: ptn_overlap is unsigned, so the if() condition
-                 below is always true!  Either it should be '> 0', or the
-                 code block should be unconditional.  See also r842362. */
-              if (ptn_overlap >= 0)
-                {
-                  /* Issue second subrange in the pattern. */
-                  const apr_size_t length =
-                    MIN(op->length - fix_off - fix_limit,
-                        ptn_length - ptn_overlap);
-                  copy_source_ops(op->offset + ptn_overlap,
-                                  op->offset + ptn_overlap + length,
-                                  tgt_off,
-                                  op_ndx,
-                                  build_baton, window, ndx, pool);
-                  fix_off += length;
-                  tgt_off += length;
-                }
+              /* Unconditionally issue the second subrange of the
+                 pattern. This is always correct, since the outer
+                 condition already verifies that there is an overlap
+                 in the target copy. */
+              {
+                const apr_size_t length =
+                  MIN(op->length - fix_off - fix_limit,
+                      ptn_length - ptn_overlap);
+                copy_source_ops(op->offset + ptn_overlap,
+                                op->offset + ptn_overlap + length,
+                                tgt_off,
+                                op_ndx,
+                                build_baton, window, ndx, pool);
+                fix_off += length;
+                tgt_off += length;
+              }
 
               assert(fix_off + fix_limit <= op->length);
               if (ptn_overlap > 0

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/editor.c Wed Jun  5 09:22:43 2013
@@ -35,7 +35,7 @@
    introduce additional memory and runtime overhead, and should not be used
    in production builds.
 
-   ### Remove before release? 
+   ### Remove before release?
 
    ### Disabled for now.  If I call svn_editor_alter_directory(A) then
        svn_editor_add_file(A/f) the latter fails on SHOULD_ALLOW_ADD.

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/path_driver.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/path_driver.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/path_driver.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/path_driver.c Wed Jun  5 09:22:43 2013
@@ -96,7 +96,7 @@ pop_stack(apr_array_header_t *db_stack,
 
   /* Close the most recent directory pushed to the stack. */
   item = APR_ARRAY_IDX(db_stack, db_stack->nelts - 1, dir_stack_t *);
-  apr_array_pop(db_stack);
+  (void) apr_array_pop(db_stack);
   SVN_ERR(editor->close_directory(item->dir_baton, item->pool));
   svn_pool_destroy(item->pool);
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/svndiff.c Wed Jun  5 09:22:43 2013
@@ -216,7 +216,7 @@ send_simple_insertion_window(svn_txdelta
     {
       header_current = headers;
     }
-    
+
   /* Encode the action code and length.  */
   if (window->tview_len >> 6 == 0)
     {
@@ -242,7 +242,7 @@ send_simple_insertion_window(svn_txdelta
     header_current[i] = ibuf[i];
 
   header_len = header_current - headers + ip_len;
-    
+
   /* Write out the window.  */
   SVN_ERR(svn_stream_write(eb->output, (const char *)headers, &header_len));
   if (len)

Modified: subversion/branches/verify-keep-going/subversion/libsvn_delta/text_delta.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_delta/text_delta.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_delta/text_delta.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_delta/text_delta.c Wed Jun  5 09:22:43 2013
@@ -669,7 +669,7 @@ patterning_copy(char *target, const char
 
 #if SVN_UNALIGNED_ACCESS_IS_OK
 
-  if (end + sizeof(apr_uint32_t) <= target)
+  if (source + sizeof(apr_uint32_t) <= target)
     {
       /* Source and target are at least 4 bytes apart, so we can copy in
        * 4-byte chunks.  */
@@ -935,28 +935,28 @@ svn_error_t *svn_txdelta_send_stream(svn
   while (1)
     {
       apr_size_t read_len = SVN__STREAM_CHUNK_SIZE;
-      
+
       SVN_ERR(svn_stream_read(stream, read_buf, &read_len));
       if (read_len == 0)
         break;
-      
+
       window_data.data = read_buf;
       window_data.len = read_len;
-      
+
       delta_op.action_code = svn_txdelta_new;
       delta_op.offset = 0;
       delta_op.length = read_len;
-      
+
       delta_window.tview_len = read_len;
       delta_window.num_ops = 1;
       delta_window.ops = &delta_op;
       delta_window.new_data = &window_data;
-      
+
       SVN_ERR(handler(&delta_window, handler_baton));
 
       if (digest)
         SVN_ERR(svn_checksum_update(md5_checksum_ctx, read_buf, read_len));
-      
+
       if (read_len < SVN__STREAM_CHUNK_SIZE)
         break;
     }
@@ -969,7 +969,7 @@ svn_error_t *svn_txdelta_send_stream(svn
       SVN_ERR(svn_checksum_final(&md5_checksum, md5_checksum_ctx, pool));
       memcpy(digest, md5_checksum->digest, APR_MD5_DIGESTSIZE);
     }
-  
+
   return SVN_NO_ERROR;
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_file.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_file.c Wed Jun  5 09:22:43 2013
@@ -448,7 +448,7 @@ find_identical_prefix(svn_boolean_t *rea
             file[i].curp += delta;
 
           /* Skipped data without EOL markers, so last char was not a CR. */
-          had_cr = FALSE; 
+          had_cr = FALSE;
         }
 #endif
 
@@ -634,7 +634,7 @@ find_identical_suffix(apr_off_t *suffix_
         min_curp[0] += suffix_min_offset0;
 
       /* Scan quickly by reading with machine-word granularity. */
-      for (i = 0, can_read_word = TRUE; i < file_len; i++)
+      for (i = 0, can_read_word = TRUE; can_read_word && i < file_len; i++)
         can_read_word = can_read_word
                         && (  (file_for_suffix[i].curp + 1
                                  - sizeof(apr_uintptr_t))
@@ -652,7 +652,7 @@ find_identical_suffix(apr_off_t *suffix_
           if (contains_eol(chunk))
             break;
 
-          for (i = 1, is_match = TRUE; i < file_len; i++)
+          for (i = 1, is_match = TRUE; is_match && i < file_len; i++)
             is_match = is_match
                        && (   chunk
                            == *(const apr_uintptr_t *)
@@ -957,7 +957,7 @@ datasource_get_next_token(apr_uint32_t *
          function.
 
          When changing things here, make sure the whitespace settings are
-         applied, or we mught not reach the exact suffix boundary as token
+         applied, or we might not reach the exact suffix boundary as token
          boundary. */
       SVN_ERR(read_chunk(file->file, file->path,
                          curp, length,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_memory.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_memory.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_memory.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_diff/diff_memory.c Wed Jun  5 09:22:43 2013
@@ -425,7 +425,7 @@ output_unified_token_range(output_baton_
         break;
     }
 
-  if (btn->current_token[tokens] == source->tokens->nelts 
+  if (btn->current_token[tokens] == source->tokens->nelts
       && source->ends_without_eol)
     {
       const char *out_str;
@@ -436,7 +436,7 @@ output_unified_token_range(output_baton_
       svn_stringbuf_appendcstr(btn->hunk, out_str);
     }
 
-  
+
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/verify-keep-going/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_diff/parse-diff.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_diff/parse-diff.c Wed Jun  5 09:22:43 2013
@@ -1146,8 +1146,9 @@ svn_diff_open_patch_file(svn_patch_file_
   svn_patch_file_t *p;
 
   p = apr_palloc(result_pool, sizeof(*p));
-  SVN_ERR(svn_io_file_open(&p->apr_file, local_abspath, APR_READ,
-                           APR_OS_DEFAULT, result_pool));
+  SVN_ERR(svn_io_file_open(&p->apr_file, local_abspath,
+                           APR_READ | APR_BUFFERED, APR_OS_DEFAULT,
+                           result_pool));
   p->next_patch_offset = 0;
   *patch_file = p;
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.c Wed Jun  5 09:22:43 2013
@@ -239,7 +239,7 @@ get_library_vtable(fs_library_vtable_t *
 
 #if defined(SVN_USE_DSO) && APR_HAS_DSO
   /* Third party FS modules that are unknown at compile time.
-     
+
      A third party FS is identified by the file fs-type containing a
      third party name, say "foo".  The loader will load the DSO with
      the name "libsvn_fs_foo" and use the entry point with the name
@@ -373,7 +373,16 @@ default_warning_func(void *baton, svn_er
 {
   /* The one unforgiveable sin is to fail silently.  Dumping to stderr
      or /dev/tty is not acceptable default behavior for server
-     processes, since those may both be equivalent to /dev/null.  */
+     processes, since those may both be equivalent to /dev/null.
+
+     That said, be a good citizen and print something anyway, in case it goes
+     somewhere, and our caller hasn't overridden the abort() call.
+   */
+  if (svn_error_get_malfunction_handler()
+      == svn_error_abort_on_malfunction)
+    /* ### TODO: extend the malfunction API such that non-abort()ing consumers
+       ### also get the information on ERR. */
+    svn_handle_error2(err, stderr, FALSE /* fatal */, "svn: fs-loader: ");
   SVN_ERR_MALFUNCTION_NO_RETURN();
 }
 
@@ -487,6 +496,7 @@ svn_fs_upgrade(const char *path, apr_poo
 
 svn_error_t *
 svn_fs_verify(const char *path,
+              apr_hash_t *fs_config,
               svn_revnum_t start,
               svn_revnum_t end,
               svn_fs_progress_notify_func_t notify_func,
@@ -499,7 +509,7 @@ svn_fs_verify(const char *path,
   svn_fs_t *fs;
 
   SVN_ERR(fs_library_vtable(&vtable, path, pool));
-  fs = fs_new(NULL, pool);
+  fs = fs_new(fs_config, pool);
 
   SVN_MUTEX__WITH_LOCK(common_pool_lock,
                        vtable->verify_fs(fs, path, start, end,
@@ -515,6 +525,15 @@ svn_fs_path(svn_fs_t *fs, apr_pool_t *po
   return apr_pstrdup(pool, fs->path);
 }
 
+apr_hash_t *
+svn_fs_config(svn_fs_t *fs, apr_pool_t *pool)
+{
+  if (fs->config)
+    return apr_hash_copy(pool, fs->config);
+
+  return NULL;
+}
+
 svn_error_t *
 svn_fs_delete_fs(const char *path, apr_pool_t *pool)
 {
@@ -644,11 +663,11 @@ svn_fs_verify_root(svn_fs_root_t *root,
 
 svn_error_t *
 svn_fs_freeze(svn_fs_t *fs,
-              svn_error_t *(*freeze_body)(void *baton, apr_pool_t *pool),
-              void *baton,
+              svn_fs_freeze_func_t freeze_func,
+              void *freeze_baton,
               apr_pool_t *pool)
 {
-  SVN_ERR(fs->vtable->freeze(fs, freeze_body, baton, pool));
+  SVN_ERR(fs->vtable->freeze(fs, freeze_func, freeze_baton, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1617,20 +1636,39 @@ svn_fs_version(void)
 
 /** info **/
 svn_error_t *
-svn_fs_info(const svn_fs_info_t **info,
+svn_fs_info(const svn_fs_info_placeholder_t **info_p,
             svn_fs_t *fs,
             apr_pool_t *result_pool,
             apr_pool_t *scratch_pool)
 {
-  SVN__NOT_IMPLEMENTED();
+  if (fs->vtable->info_fsap)
+    {
+      SVN_ERR(fs->vtable->info_fsap((const void **)info_p, fs,
+                                    result_pool, scratch_pool));
+    }
+  else
+    {
+      svn_fs_info_placeholder_t *info = apr_palloc(result_pool, sizeof(*info));
+      /* ### Ask the disk(!), since svn_fs_t doesn't cache the answer. */
+      SVN_ERR(svn_fs_type(&info->fs_type, fs->path, result_pool));
+      *info_p = info;
+    }
+  return SVN_NO_ERROR;
 }
 
-svn_fs_info_t *
-svn_fs_info_dup(const svn_fs_info_t *info,
-                apr_pool_t *result_pool)
+void *
+svn_fs_info_dup(const void *info_void,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
 {
-  /* Not implemented. */
-  SVN_ERR_MALFUNCTION_NO_RETURN();
-  return NULL;
+  const svn_fs_info_placeholder_t *info = info_void;
+  fs_library_vtable_t *vtable;
+
+  SVN_ERR(get_library_vtable(&vtable, info->fs_type, scratch_pool));
+  
+  if (vtable->info_fsap_dup)
+    return vtable->info_fsap_dup(info_void, result_pool);
+  else
+    return apr_pmemdup(result_pool, info, sizeof(*info));
 }
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.h?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs/fs-loader.h Wed Jun  5 09:22:43 2013
@@ -131,7 +131,9 @@ typedef struct fs_library_vtable_t
                                                                const char *,
                                                                apr_hash_t *,
                                                                apr_pool_t *));
-
+  /* For svn_fs_info_fsfs_dup(). */
+  void *(*info_fsap_dup)(const void *fsap_info,
+                         apr_pool_t *result_pool);
 } fs_library_vtable_t;
 
 /* This is the type of symbol an FS module defines to fetch the
@@ -221,11 +223,16 @@ typedef struct fs_vtable_t
                                     svn_fs_t *fs,
                                     apr_pool_t *result_pool,
                                     apr_pool_t *scratch_pool);
+  svn_error_t *(*info_fsap)(const void **fsap_info,
+                            svn_fs_t *fs,
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
+  /* info_fsap_dup is in the library vtable. */
   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);
+                         svn_fs_freeze_func_t freeze_func,
+                         void *freeze_baton, apr_pool_t *pool);
   svn_error_t *(*bdb_set_errcall)(svn_fs_t *fs,
                                   void (*handler)(const char *errpfx,
                                                   char *msg));

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_base/fs.c Wed Jun  5 09:22:43 2013
@@ -522,7 +522,7 @@ base_bdb_info_config_files(apr_array_hea
                                                          result_pool);
   return SVN_NO_ERROR;
 }
- 
+
 static svn_error_t *
 base_bdb_verify_root(svn_fs_root_t *root,
                      apr_pool_t *scratch_pool)
@@ -533,8 +533,8 @@ base_bdb_verify_root(svn_fs_root_t *root
 
 static svn_error_t *
 base_bdb_freeze(svn_fs_t *fs,
-                svn_error_t *(*freeze_body)(void *, apr_pool_t *),
-                void *baton,
+                svn_fs_freeze_func_t freeze_func,
+                void *freeze_baton,
                 apr_pool_t *pool)
 {
   SVN__NOT_IMPLEMENTED();
@@ -562,6 +562,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_base__get_locks,
   base_bdb_info_format,
   base_bdb_info_config_files,
+  NULL /* info_fsap */,
   base_bdb_verify_root,
   base_bdb_freeze,
   base_bdb_set_errcall,
@@ -718,7 +719,7 @@ open_databases(svn_fs_t *fs,
 }
 
 
-/* Called by functions that initialize an svn_fs_t struct, after that 
+/* Called by functions that initialize an svn_fs_t struct, after that
    initialization is done, to populate svn_fs_t->uuid. */
 static svn_error_t *
 populate_opened_fs(svn_fs_t *fs, apr_pool_t *scratch_pool)
@@ -1462,7 +1463,8 @@ static fs_library_vtable_t library_vtabl
   base_bdb_pack,
   base_bdb_logfiles,
   svn_fs_base__id_parse,
-  base_set_svn_fs_open
+  base_set_svn_fs_open,
+  NULL /* info_fsap_dup */
 };
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/caching.c Wed Jun  5 09:22:43 2013
@@ -73,7 +73,7 @@ normalize_key_part(const char *original,
    *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 *
@@ -133,7 +133,7 @@ read_config(svn_memcache_t **memcache_p,
    * Revprop caching significantly speeds up operations like
    * svn ls -v. However, it requires synchronization that may
    * not be available or efficient in the current server setup.
-   * 
+   *
    * If the caller chose option "2", enable revprop caching if
    * the required API support is there to make it efficient.
    */
@@ -285,7 +285,7 @@ init_callbacks(svn_cache__t *cache,
  *
  * Unless NO_HANDLER is true, register an error handler that reports errors
  * as warnings to the FS warning callback.
- * 
+ *
  * Cache is allocated in POOL.
  * */
 static svn_error_t *
@@ -474,7 +474,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                            fs,
                            no_handler,
                            fs->pool));
-      
+
       SVN_ERR(create_cache(&(ffd->properties_cache),
                            NULL,
                            membuffer,
@@ -487,7 +487,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                            fs,
                            no_handler,
                            fs->pool));
-      
+
       SVN_ERR(create_cache(&(ffd->mergeinfo_cache),
                            NULL,
                            membuffer,
@@ -500,7 +500,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                            fs,
                            no_handler,
                            fs->pool));
-      
+
       SVN_ERR(create_cache(&(ffd->mergeinfo_existence_cache),
                            NULL,
                            membuffer,

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.c Wed Jun  5 09:22:43 2013
@@ -126,8 +126,8 @@ fs_set_errcall(svn_fs_t *fs,
 
 struct fs_freeze_baton_t {
   svn_fs_t *fs;
-  svn_error_t *(*freeze_body)(void *, apr_pool_t *);
-  void *baton;
+  svn_fs_freeze_func_t freeze_func;
+  void *freeze_baton;
 };
 
 static svn_error_t *
@@ -141,22 +141,22 @@ fs_freeze_body(void *baton,
   if (exists)
     SVN_ERR(svn_fs_fs__lock_rep_cache(b->fs, pool));
 
-  SVN_ERR(b->freeze_body(b->baton, pool));
+  SVN_ERR(b->freeze_func(b->freeze_baton, pool));
 
   return SVN_NO_ERROR;
 }
 
 static svn_error_t *
 fs_freeze(svn_fs_t *fs,
-          svn_error_t *(*freeze_body)(void *, apr_pool_t *),
-          void *baton,
+          svn_fs_freeze_func_t freeze_func,
+          void *freeze_baton,
           apr_pool_t *pool)
 {
   struct fs_freeze_baton_t b;
 
   b.fs = fs;
-  b.freeze_body = freeze_body;
-  b.baton = baton;
+  b.freeze_func = freeze_func;
+  b.freeze_baton = freeze_baton;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
   SVN_ERR(svn_fs_fs__with_write_lock(fs, fs_freeze_body, &b, pool));
@@ -164,6 +164,21 @@ fs_freeze(svn_fs_t *fs,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+fs_info(const void **fsfs_info,
+        svn_fs_t *fs,
+        apr_pool_t *result_pool,
+        apr_pool_t *scratch_pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  svn_fs_fsfs_info_t *info = apr_palloc(result_pool, sizeof(*info));
+  info->fs_type = SVN_FS_TYPE_FSFS;
+  info->shard_size = ffd->max_files_per_dir;
+  info->min_unpacked_rev = ffd->min_unpacked_rev;
+  *fsfs_info = info;
+  return SVN_NO_ERROR;
+}
+
 
 
 /* The vtable associated with a specific open filesystem. */
@@ -186,6 +201,7 @@ static fs_vtable_t fs_vtable = {
   svn_fs_fs__get_locks,
   svn_fs_fs__info_format,
   svn_fs_fs__info_config_files,
+  fs_info,
   svn_fs_fs__verify_root,
   fs_freeze,
   fs_set_errcall
@@ -414,6 +430,15 @@ fs_set_svn_fs_open(svn_fs_t *fs,
   return SVN_NO_ERROR;
 }
 
+static void *
+fs_info_dup(const void *fsfs_info_void,
+            apr_pool_t *result_pool)
+{
+  /* All fields are either ints or static strings. */
+  const svn_fs_fsfs_info_t *fsfs_info = fsfs_info_void;
+  return apr_pmemdup(result_pool, fsfs_info, sizeof(*fsfs_info));
+}
+
 
 /* Base FS library vtable, used by the FS loader library. */
 
@@ -431,7 +456,8 @@ static fs_library_vtable_t library_vtabl
   fs_pack,
   fs_logfiles,
   NULL /* parse_id */,
-  fs_set_svn_fs_open
+  fs_set_svn_fs_open,
+  fs_info_dup
 };
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs.h Wed Jun  5 09:22:43 2013
@@ -349,7 +349,7 @@ typedef struct fs_fs_data_t
 
   /* Whether packed revprop files shall be compressed. */
   svn_boolean_t compress_packed_revprops;
-  
+
   /* Whether directory nodes shall be deltified just like file nodes. */
   svn_boolean_t deltify_directories;
 

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/fs_fs.c Wed Jun  5 09:22:43 2013
@@ -1102,15 +1102,8 @@ write_format(const char *path, int forma
     }
   else
     {
-      const char *path_tmp;
-
-      SVN_ERR(svn_io_write_unique(&path_tmp,
-                                  svn_dirent_dirname(path, pool),
-                                  sb->data, sb->len,
-                                  svn_io_file_del_none, pool));
-
-      /* rename the temp file as the real destination */
-      SVN_ERR(svn_io_file_rename(path_tmp, path, pool));
+      SVN_ERR(svn_io_write_atomic(path, sb->data, sb->len,
+                                  NULL /* copy_perms_path */, pool));
     }
 
   /* And set the perms to make it read only */
@@ -1157,9 +1150,9 @@ read_config(fs_fs_data_t *ffd,
             const char *fs_path,
             apr_pool_t *pool)
 {
-  SVN_ERR(svn_config_read2(&ffd->config,
+  SVN_ERR(svn_config_read3(&ffd->config,
                            svn_dirent_join(fs_path, PATH_CONFIG, pool),
-                           FALSE, FALSE, pool));
+                           FALSE, FALSE, FALSE, pool));
 
   /* Initialize ffd->rep_sharing_allowed. */
   if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
@@ -3069,7 +3062,7 @@ svn_fs_fs__rev_get_root(svn_fs_id_t **ro
  *
  * Mechanism:
  * ----------
- * 
+ *
  * Revprop caching needs to be activated and will be deactivated for the
  * respective FS instance if the necessary infrastructure could not be
  * initialized.  In deactivated mode, there is almost no runtime overhead
@@ -3162,20 +3155,15 @@ write_revprop_generation_file(svn_fs_t *
                               apr_int64_t current,
                               apr_pool_t *pool)
 {
-  apr_file_t *file;
-  const char *tmp_path;
-
   char buf[SVN_INT64_BUFFER_SIZE];
   apr_size_t len = svn__i64toa(buf, current);
   buf[len] = '\n';
 
-  SVN_ERR(svn_io_open_unique_file3(&file, &tmp_path, fs->path,
-                                   svn_io_file_del_none, pool, pool));
-  SVN_ERR(svn_io_file_write_full(file, buf, len + 1, NULL, pool));
-  SVN_ERR(svn_io_file_close(file, pool));
+  SVN_ERR(svn_io_write_atomic(path_revprop_generation(fs, pool),
+                              buf, len + 1,
+                              NULL /* copy_perms */, pool));
 
-  return move_into_place(tmp_path, path_revprop_generation(fs, pool),
-                         tmp_path, pool);
+  return SVN_NO_ERROR;
 }
 
 /* Make sure the revprop_namespace member in FS is set. */
@@ -3215,7 +3203,7 @@ ensure_revprop_generation(svn_fs_t *fs, 
   if (ffd->revprop_generation == NULL)
     {
       apr_int64_t current = 0;
-      
+
       SVN_ERR(svn_named_atomic__get(&ffd->revprop_generation,
                                     ffd->revprop_namespace,
                                     ATOMIC_REVPROP_GENERATION,
@@ -3266,7 +3254,7 @@ log_revprop_cache_init_warning(svn_fs_t 
 
   if (fs->warning)
     (fs->warning)(fs->warning_baton, err);
-  
+
   svn_error_clear(err);
 }
 
@@ -3292,7 +3280,7 @@ has_revprop_cache(svn_fs_t *fs, apr_pool
       log_revprop_cache_init_warning(fs, NULL,
                                      "Revprop caching for '%s' disabled"
                                      " because it would be inefficient.");
-      
+
       return FALSE;
     }
 
@@ -3337,7 +3325,7 @@ revprop_generation_fixup(void *void_bato
 {
   revprop_generation_upgrade_t *baton = void_baton;
   assert(baton->ffd->has_write_lock);
-  
+
   /* Maybe, either the original revprop writer or some other reader has
      already corrected / bumped the revprop generation.  Thus, we need
      to read it again. */
@@ -3503,7 +3491,7 @@ typedef struct packed_revprops_t
   apr_array_header_t *offsets;
 
 
-  /* concatenation of the serialized representation of all revprops 
+  /* concatenation of the serialized representation of all revprops
    * in the pack, i.e. the pack content without header and compression */
   svn_stringbuf_t *packed_revprops;
 
@@ -3517,7 +3505,7 @@ typedef struct packed_revprops_t
  * Three more parameters are being used to update the revprop cache: FS is
  * our file system, the revprops belong to REVISION and the global revprop
  * GENERATION is used as well.
- * 
+ *
  * The returned hash will be allocated in POOL, SCRATCH_POOL is being used
  * for temporary allocations.
  */
@@ -3893,7 +3881,7 @@ get_revision_proplist(apr_hash_t **propl
  * filesystem FS to a non-packed file.  Return the name of that temporary
  * file in *TMP_PATH and the file path that it must be moved to in
  * *FINAL_PATH.
- * 
+ *
  * Use POOL for allocations.
  */
 static svn_error_t *
@@ -3925,7 +3913,7 @@ write_non_packed_revprop(const char **fi
  * 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.
- * 
+ *
  * Use POOL for temporary allocations.
  */
 static svn_error_t *
@@ -3953,7 +3941,7 @@ switch_to_new_revprop(svn_fs_t *fs,
     {
       apr_pool_t *iterpool = svn_pool_create(pool);
       int i;
-      
+
       for (i = 0; i < files_to_delete->nelts; ++i)
         {
           const char *path = APR_ARRAY_IDX(files_to_delete, i, const char*);
@@ -4003,7 +3991,7 @@ serialize_revprops_header(svn_stream_t *
 
 /* Writes the a pack file to FILE_STREAM.  It copies the serialized data
  * from REVPROPS for the indexes [START,END) except for index CHANGED_INDEX.
- * 
+ *
  * The data for the latter is taken from NEW_SERIALIZED.  Note, that
  * CHANGED_INDEX may be outside the [START,END) range, i.e. no new data is
  * taken in that case but only a subset of the old data will be copied.
@@ -4047,9 +4035,9 @@ repack_revprops(svn_fs_t *fs,
       }
     else
       {
-        apr_size_t size 
+        apr_size_t size
             = (apr_size_t)APR_ARRAY_IDX(revprops->sizes, i, apr_off_t);
-        apr_size_t offset 
+        apr_size_t offset
             = (apr_size_t)APR_ARRAY_IDX(revprops->offsets, i, apr_off_t);
 
         SVN_ERR(svn_stream_write(stream,
@@ -4110,7 +4098,7 @@ repack_stream_open(svn_stream_t **stream
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                              _("Packed file '%s' misses a tag"),
                              old_filename);
-    
+
   SVN_ERR(svn_cstring_atoi64(&tag, tag_string + 1));
   new_filename = svn_string_createf(pool, "%ld.%" APR_INT64_T_FMT,
                                     revprops->start_revision + start,
@@ -4194,7 +4182,7 @@ write_packed_revprop(const char **final_
     {
       /* split the pack file into two of roughly equal size */
       int right_count, left_count, i;
-          
+
       int left = 0;
       int right = revprops->sizes->nelts - 1;
       apr_off_t left_size = 2 * SVN_INT64_BUFFER_SIZE;
@@ -4279,7 +4267,7 @@ write_packed_revprop(const char **final_
 
       SVN_ERR(svn_stream_close(stream));
     }
-  
+
   return SVN_NO_ERROR;
 }
 
@@ -4302,7 +4290,7 @@ set_revision_proplist(svn_fs_t *fs,
 
   /* this info will not change while we hold the global FS write lock */
   is_packed = 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))
@@ -4729,7 +4717,7 @@ set_cached_combined_window(svn_stringbuf
    Also, set *WINDOW_P to the base window content for *LIST, if it
    could be found in cache. Otherwise, *LIST will contain the base
    representation for the whole delta chain.
-   Finally, return the expanded size of the representation in 
+   Finally, return the expanded size of the representation in
    *EXPANDED_SIZE. It will take care of cases where only the on-disk
    size is known.  */
 static svn_error_t *
@@ -5350,7 +5338,7 @@ cache_access_wrapper(void **out,
                               data_len - 1, /* cache adds terminating 0 */
                               wrapper_baton->baton,
                               pool));
-  
+
   /* non-NULL value to signal the calling cache that all went well */
   *out = baton;
 
@@ -5693,7 +5681,7 @@ svn_fs_fs__get_proplist(apr_hash_t **pro
       SVN_ERR(read_representation(&stream, fs, noderev->prop_rep, pool));
       SVN_ERR(svn_hash_read2(proplist, stream, SVN_HASH_TERMINATOR, pool));
       SVN_ERR(svn_stream_close(stream));
-      
+
       if (ffd->properties_cache && SVN_IS_VALID_REVNUM(rep->revision))
         SVN_ERR(svn_cache__set(ffd->properties_cache, &key, proplist, pool));
     }
@@ -6173,7 +6161,7 @@ process_changes(apr_hash_t *changed_path
   for (i = 0; i < changes->nelts; ++i)
     {
       change_t *change = APR_ARRAY_IDX(changes, i, change_t *);
-      
+
       SVN_ERR(fold_change(changed_paths, change, copyfrom_cache));
 
       /* Now, if our change was a deletion or replacement, we have to
@@ -6247,7 +6235,7 @@ read_all_changes(apr_array_header_t **ch
   /* pre-allocate enough room for most change lists
      (will be auto-expanded as necessary) */
   *changes = apr_array_make(pool, 30, sizeof(change_t *));
-  
+
   SVN_ERR(read_change(&change, file, pool));
   while (change)
     {
@@ -6308,7 +6296,7 @@ get_changes(apr_array_header_t **changes
     }
 
   /* read changes from revision file */
-  
+
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
   SVN_ERR(open_pack_or_rev_file(&revision_file, fs, rev, pool));
@@ -6318,11 +6306,11 @@ get_changes(apr_array_header_t **changes
 
   SVN_ERR(svn_io_file_seek(revision_file, APR_SET, &changes_offset, pool));
   SVN_ERR(read_all_changes(changes, revision_file, pool));
-  
+
   SVN_ERR(svn_io_file_close(revision_file, pool));
 
   /* cache for future reference */
-  
+
   if (ffd->changes_cache)
     SVN_ERR(svn_cache__set(ffd->changes_cache, &rev, *changes, pool));
 
@@ -6401,7 +6389,6 @@ get_and_increment_txn_key_body(void *bat
 {
   struct get_and_increment_txn_key_baton *cb = baton;
   const char *txn_current_filename = path_txn_current(cb->fs, pool);
-  const char *tmp_filename;
   char next_txn_id[MAX_KEY_SIZE+3];
   apr_size_t len;
 
@@ -6420,11 +6407,8 @@ get_and_increment_txn_key_body(void *bat
   ++len;
   next_txn_id[len] = '\0';
 
-  SVN_ERR(svn_io_write_unique(&tmp_filename,
-                              svn_dirent_dirname(txn_current_filename, pool),
-                              next_txn_id, len, svn_io_file_del_none, pool));
-  SVN_ERR(move_into_place(tmp_filename, txn_current_filename,
-                          txn_current_filename, pool));
+  SVN_ERR(svn_io_write_atomic(txn_current_filename, next_txn_id, len,
+                              txn_current_filename /* copy_perms path */, pool));
 
   return SVN_NO_ERROR;
 }
@@ -6602,7 +6586,6 @@ svn_fs_fs__change_txn_props(svn_fs_txn_t
                             const apr_array_header_t *props,
                             apr_pool_t *pool)
 {
-  const char *txn_prop_filename;
   svn_stringbuf_t *buf;
   svn_stream_t *stream;
   apr_hash_t *txn_prop = apr_hash_make(pool);
@@ -6632,15 +6615,10 @@ svn_fs_fs__change_txn_props(svn_fs_txn_t
   stream = svn_stream_from_stringbuf(buf, pool);
   SVN_ERR(svn_hash_write2(txn_prop, stream, SVN_HASH_TERMINATOR, pool));
   SVN_ERR(svn_stream_close(stream));
-  SVN_ERR(svn_io_write_unique(&txn_prop_filename,
-                              path_txn_dir(txn->fs, txn->id, pool),
-                              buf->data,
-                              buf->len,
-                              svn_io_file_del_none,
-                              pool));
-  return svn_io_file_rename(txn_prop_filename,
-                            path_txn_props(txn->fs, txn->id, pool),
-                            pool);
+  SVN_ERR(svn_io_write_atomic(path_txn_props(txn->fs, txn->id, pool),
+                              buf->data, buf->len,
+                              NULL /* copy_perms_path */, pool));
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -7161,7 +7139,7 @@ choose_delta_base(representation_t **rep
 
       /* If there is a shared rep along the way, we need to limit the
        * length of the deltification chain.
-       * 
+       *
        * Please note that copied nodes - such as branch directories - will
        * look the same (false positive) while reps shared within the same
        * revision will not be caught (false negative).
@@ -7192,7 +7170,7 @@ choose_delta_base(representation_t **rep
        * extreme cases. */
       apr_pool_t *sub_pool = svn_pool_create(pool);
       representation_t base_rep = **rep;
-      
+
       /* Some reasonable limit, depending on how acceptable longer linear
        * chains are in this repo.  Also, allow for some minimal chain. */
       int max_chain_length = 2 * (int)ffd->max_linear_deltification + 2;
@@ -7245,12 +7223,12 @@ rep_write_cleanup(void *data)
   struct rep_write_baton *b = data;
   const char *txn_id = svn_fs_fs__id_txn_id(b->noderev->id);
   svn_error_t *err;
-  
+
   /* Truncate and close the protorevfile. */
   err = svn_io_file_trunc(b->file, b->rep_offset, b->pool);
   err = svn_error_compose_create(err, svn_io_file_close(b->file, b->pool));
 
-  /* Remove our lock regardless of any preceeding errors so that the 
+  /* Remove our lock regardless of any preceeding errors so that the
      being_written flag is always removed and stays consistent with the
      file lock which will be removed no matter what since the pool is
      going away. */
@@ -8245,7 +8223,7 @@ write_current(svn_fs_t *fs, svn_revnum_t
               const char *next_copy_id, apr_pool_t *pool)
 {
   char *buf;
-  const char *tmp_name, *name;
+  const char *name;
   fs_fs_data_t *ffd = fs->fsap_data;
 
   /* Now we can just write out this line. */
@@ -8255,12 +8233,10 @@ write_current(svn_fs_t *fs, svn_revnum_t
     buf = apr_psprintf(pool, "%ld %s %s\n", rev, next_node_id, next_copy_id);
 
   name = svn_fs_fs__path_current(fs, pool);
-  SVN_ERR(svn_io_write_unique(&tmp_name,
-                              svn_dirent_dirname(name, pool),
-                              buf, strlen(buf),
-                              svn_io_file_del_none, pool));
+  SVN_ERR(svn_io_write_atomic(name, buf, strlen(buf),
+                              name /* copy_perms_path */, pool));
 
-  return move_into_place(tmp_name, name, name, pool);
+  return SVN_NO_ERROR;
 }
 
 /* Open a new svn_fs_t handle to FS, set that handle's concept of "current
@@ -8658,6 +8634,9 @@ svn_fs_fs__commit(svn_revnum_t *new_rev_
        * We use an sqlite transaction to speed things up;
        * see <http://www.sqlite.org/faq.html#q19>.
        */
+      /* ### A commit that touches thousands of files will starve other
+             (reader/writer) commits for the duration of the below call.
+             Maybe write in batches? */
       SVN_SQLITE__WITH_TXN(
         write_reps_to_cache(fs, cb.reps_to_cache, pool),
         ffd->rep_cache_db);
@@ -9057,7 +9036,7 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
 
 /* Return TRUE, if for REVISION in FS, we can find the revprop pack file.
  * Use POOL for temporary allocations.
- * Set *MISSING, if the reason is a missing manifest or pack file. 
+ * Set *MISSING, if the reason is a missing manifest or pack file.
  */
 static svn_boolean_t
 packed_revprop_available(svn_boolean_t *missing,
@@ -9311,7 +9290,6 @@ svn_fs_fs__set_uuid(svn_fs_t *fs,
 {
   char *my_uuid;
   apr_size_t my_uuid_len;
-  const char *tmp_path;
   const char *uuid_path = path_uuid(fs, pool);
 
   if (! uuid)
@@ -9321,15 +9299,11 @@ svn_fs_fs__set_uuid(svn_fs_t *fs,
   my_uuid = apr_pstrcat(fs->pool, uuid, "\n", (char *)NULL);
   my_uuid_len = strlen(my_uuid);
 
-  SVN_ERR(svn_io_write_unique(&tmp_path,
-                              svn_dirent_dirname(uuid_path, pool),
-                              my_uuid, my_uuid_len,
-                              svn_io_file_del_none, pool));
-
   /* We use the permissions of the 'current' file, because the 'uuid'
      file does not exist during repository creation. */
-  SVN_ERR(move_into_place(tmp_path, uuid_path,
-                          svn_fs_fs__path_current(fs, pool), pool));
+  SVN_ERR(svn_io_write_atomic(uuid_path, my_uuid, my_uuid_len,
+                              svn_fs_fs__path_current(fs, pool) /* perms */,
+                              pool));
 
   /* Remove the newline we added, and stash the UUID. */
   my_uuid[my_uuid_len - 1] = '\0';
@@ -9794,16 +9768,16 @@ write_revnum_file(const char *fs_path,
                   svn_revnum_t revnum,
                   apr_pool_t *scratch_pool)
 {
-  const char *final_path, *tmp_path;
-  svn_stream_t *tmp_stream;
+  const char *final_path;
+  char buf[SVN_INT64_BUFFER_SIZE];
+  apr_size_t len = svn__i64toa(buf, revnum);
+  buf[len] = '\n';
 
   final_path = svn_dirent_join(fs_path, filename, scratch_pool);
-  SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_path, fs_path,
-                                   svn_io_file_del_none,
-                                   scratch_pool, scratch_pool));
-  SVN_ERR(svn_stream_printf(tmp_stream, scratch_pool, "%ld\n", revnum));
-  SVN_ERR(svn_stream_close(tmp_stream));
-  SVN_ERR(move_into_place(tmp_path, final_path, final_path, scratch_pool));
+
+  SVN_ERR(svn_io_write_atomic(final_path, buf, len + 1,
+                              final_path /* copy_perms */, scratch_pool));
+
   return SVN_NO_ERROR;
 }
 
@@ -10132,7 +10106,7 @@ delete_revprops_shard(const char *shard_
  * for allocations.  REVPROPS_DIR will be NULL if revprop packing is not
  * supported.  COMPRESSION_LEVEL and MAX_PACK_SIZE will be ignored in that
  * case.
- * 
+ *
  * CANCEL_FUNC and CANCEL_BATON are what you think they are; similarly
  * NOTIFY_FUNC and NOTIFY_BATON.
  *
@@ -10340,7 +10314,7 @@ typedef struct verify_walker_baton_t
 {
   /* number of calls to verify_walker() since the last clean */
   int iteration_count;
-  
+
   /* number of files opened since the last clean */
   int file_count;
 
@@ -10393,7 +10367,7 @@ verify_walker(representation_t *rep,
             }
 
           svn_pool_clear(walker_baton->pool);
-          
+
           walker_baton->iteration_count = 0;
           walker_baton->file_count = 0;
           walker_baton->file_hint = NULL;
@@ -10458,7 +10432,7 @@ svn_fs_fs__verify(svn_fs_t *fs,
       baton->last_notified_revision = SVN_INVALID_REVNUM;
       baton->notify_func = notify_func;
       baton->notify_baton = notify_baton;
-      
+
       /* tell the user that we are now ready to do *something* */
       if (notify_func)
         notify_func(SVN_INVALID_REVNUM, notify_baton, baton->pool);
@@ -10496,15 +10470,15 @@ hotcopy_io_dir_file_copy(const char *src
 
   /* Does the destination already exist? If not, we must copy it. */
   dst_target = svn_dirent_join(dst_path, file, scratch_pool);
-  SVN_ERR(svn_io_stat_dirent(&dst_dirent, dst_target, TRUE,
-                             scratch_pool, scratch_pool));
+  SVN_ERR(svn_io_stat_dirent2(&dst_dirent, dst_target, FALSE, TRUE,
+                              scratch_pool, scratch_pool));
   if (dst_dirent->kind != svn_node_none)
     {
       /* If the destination's stat information indicates that the file
        * is equal to the source, don't bother copying the file again. */
       src_target = svn_dirent_join(src_path, file, scratch_pool);
-      SVN_ERR(svn_io_stat_dirent(&src_dirent, src_target, FALSE,
-                                 scratch_pool, scratch_pool));
+      SVN_ERR(svn_io_stat_dirent2(&src_dirent, src_target, FALSE, FALSE,
+                                  scratch_pool, scratch_pool));
       if (src_dirent->kind == dst_dirent->kind &&
           src_dirent->special == dst_dirent->special &&
           src_dirent->filesize == dst_dirent->filesize &&

Modified: subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c?rev=1489765&r1=1489764&r2=1489765&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_fs_fs/temp_serializer.c Wed Jun  5 09:22:43 2013
@@ -1198,13 +1198,13 @@ typedef struct mergeinfo_data_t
 {
   /* number of paths in the hash */
   unsigned count;
-  
+
   /* COUNT keys (paths) */
   const char **keys;
-  
+
   /* COUNT keys lengths (strlen of path) */
   apr_ssize_t *key_lengths;
-  
+
   /* COUNT entries, each giving the number of ranges for the key */
   int *range_counts;
 
@@ -1256,7 +1256,7 @@ svn_fs_fs__serialize_mergeinfo(void **da
       for (k = 0; k < ranges->nelts; ++k, ++i)
         merges.ranges[i] = *APR_ARRAY_IDX(ranges, k, svn_merge_range_t*);
     }
-  
+
   /* serialize it and all its elements */
   context = svn_temp_serializer__init(&merges,
                                       sizeof(merges),
@@ -1310,7 +1310,7 @@ svn_fs_fs__deserialize_mergeinfo(void **
   int k, n;
   mergeinfo_data_t *merges = (mergeinfo_data_t *)data;
   svn_mergeinfo_t mergeinfo;
-  
+
   /* de-serialize our auxiliary data structure */
   svn_temp_deserializer__resolve(merges, (void**)&merges->keys);
   svn_temp_deserializer__resolve(merges, (void**)&merges->key_lengths);
@@ -1327,7 +1327,7 @@ svn_fs_fs__deserialize_mergeinfo(void **
                                                sizeof(svn_merge_range_t*));
       for (k = 0; k < merges->range_counts[i]; ++k, ++n)
         APR_ARRAY_PUSH(ranges, svn_merge_range_t*) = &merges->ranges[n];
-      
+
       svn_temp_deserializer__resolve((void*)merges->keys,
                                      (void**)&merges->keys[i]);
       apr_hash_set(mergeinfo, merges->keys[i], merges->key_lengths[i], ranges);