subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1148749 [4/11] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ contrib/hook-scripts/enforcer/ contrib/server-side/ contrib/server-side/fsfsfixer/fixer/ note...
Date Wed, 20 Jul 2011 13:06:16 GMT
Modified: subversion/branches/svn-bisect/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/status.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/status.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/status.c Wed Jul 20 13:06:00 2011
@@ -282,13 +282,12 @@ svn_client_status5(svn_revnum_t *result_
 
   SVN_ERR(svn_dirent_get_absolute(&target_abspath, path, pool));
   {
-    svn_node_kind_t kind, disk_kind;
+    svn_node_kind_t kind;
 
-    SVN_ERR(svn_io_check_path(target_abspath, &disk_kind, pool));
     SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE, pool));
 
-    /* Dir must be an existing directory or the status editor fails */
-    if (kind == svn_node_dir && disk_kind == svn_node_dir)
+    /* Dir must be a working copy directory or the status editor fails */
+    if (kind == svn_node_dir)
       {
         dir_abspath = target_abspath;
         target_basename = "";
@@ -313,15 +312,6 @@ svn_client_status5(svn_revnum_t *result_
                                          _("'%s' is not a working copy"),
                                          svn_dirent_local_style(path, pool));
               }
-
-            /* Check for issue #1617 and stat_tests.py 14
-               "status on '..' where '..' is not versioned". */
-            if (strcmp(path, "..") == 0)
-              {
-                return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
-                                         _("'%s' is not a working copy"),
-                                         svn_dirent_local_style(path, pool));
-              }
           }
       }
   }
@@ -377,7 +367,8 @@ svn_client_status5(svn_revnum_t *result_
                                     &edit_revision, ctx->wc_ctx,
                                     dir_abspath, target_basename,
                                     depth, get_all,
-                                    no_ignore, server_supports_depth,
+                                    no_ignore, depth_as_sticky,
+                                    server_supports_depth,
                                     ignores, tweak_status, &sb,
                                     ctx->cancel_func, ctx->cancel_baton,
                                     pool, pool));
@@ -456,10 +447,11 @@ svn_client_status5(svn_revnum_t *result_
              working copy and HEAD. */
           SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx,
                                           target_abspath,
-                                          &lock_fetch_reporter, &rb, FALSE,
-                                          depth, TRUE,
+                                          &lock_fetch_reporter, &rb,
+                                          FALSE /* restore_files */,
+                                          depth, (! depth_as_sticky),
                                           (! server_supports_depth),
-                                          FALSE,
+                                          FALSE /* use_commit_times */,
                                           ctx->cancel_func, ctx->cancel_baton,
                                           NULL, NULL, pool));
         }
@@ -542,6 +534,9 @@ svn_client_status_dup(const svn_client_s
   if (status->repos_root_url)
     st->repos_root_url = apr_pstrdup(result_pool, status->repos_root_url);
 
+  if (status->repos_uuid)
+    st->repos_uuid = apr_pstrdup(result_pool, status->repos_uuid);
+
   if (status->repos_relpath)
     st->repos_relpath = apr_pstrdup(result_pool, status->repos_relpath);
 
@@ -603,6 +598,7 @@ svn_client__create_status(svn_client_sta
   (*cst)->changed_author = status->changed_author;
 
   (*cst)->repos_root_url = status->repos_root_url;
+  (*cst)->repos_uuid = status->repos_uuid;
   (*cst)->repos_relpath = status->repos_relpath;
 
   (*cst)->switched = status->switched;

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/update.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/update.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/update.c Wed Jul 20 13:06:00 2011
@@ -255,7 +255,7 @@ update_internal(svn_revnum_t *result_rev
 
           nt = svn_wc_create_notify(local_abspath,
                                     tree_conflicted
-                                      ? svn_wc_notify_skip
+                                      ? svn_wc_notify_skip_conflicted
                                       : svn_wc_notify_update_skip_working_only,
                                     pool);
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_client/util.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_client/util.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_client/util.c Wed Jul 20 13:06:00 2011
@@ -25,7 +25,6 @@
 #include <apr_strings.h>
 
 #include "svn_pools.h"
-#include "svn_string.h"
 #include "svn_error.h"
 #include "svn_types.h"
 #include "svn_opt.h"
@@ -42,25 +41,6 @@
 
 #include "svn_private_config.h"
 
-/* Duplicate a HASH containing (char * -> svn_string_t *) key/value
-   pairs using POOL. */
-static apr_hash_t *
-string_hash_dup(apr_hash_t *hash, apr_pool_t *pool)
-{
-  apr_hash_index_t *hi;
-  apr_hash_t *new_hash = apr_hash_make(pool);
-
-  for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
-    {
-      const char *key = apr_pstrdup(pool, svn__apr_hash_index_key(hi));
-      apr_ssize_t klen = svn__apr_hash_index_klen(hi);
-      svn_string_t *val = svn_string_dup(svn__apr_hash_index_val(hi), pool);
-
-      apr_hash_set(new_hash, key, klen, val);
-    }
-  return new_hash;
-}
-
 svn_client_commit_item3_t *
 svn_client_commit_item3_create(apr_pool_t *pool)
 {
@@ -95,21 +75,6 @@ svn_client_commit_item3_dup(const svn_cl
   return new_item;
 }
 
-svn_client_proplist_item_t *
-svn_client_proplist_item_dup(const svn_client_proplist_item_t *item,
-                             apr_pool_t * pool)
-{
-  svn_client_proplist_item_t *new_item = apr_pcalloc(pool, sizeof(*new_item));
-
-  if (item->node_name)
-    new_item->node_name = svn_stringbuf_dup(item->node_name, pool);
-
-  if (item->prop_hash)
-    new_item->prop_hash = string_hash_dup(item->prop_hash, pool);
-
-  return new_item;
-}
-
 svn_error_t *
 svn_client__path_relative_to_root(const char **rel_path,
                                   svn_wc_context_t *wc_ctx,

Modified: subversion/branches/svn-bisect/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_delta/svndiff.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_delta/svndiff.c Wed Jul 20 13:06:00 2011
@@ -149,7 +149,7 @@ zlib_encode(const char *data,
      ZLIB will produce an output no shorter than the input.  Hence,
      the DATA would directly appended to OUT, so we can do that directly
      without calling ZLIB before. */
-  if (   (len < MIN_COMPRESS_SIZE) 
+  if (   (len < MIN_COMPRESS_SIZE)
       || (compression_level == SVN_DELTA_COMPRESSION_LEVEL_NONE))
     {
       svn_stringbuf_appendbytes(out, data, len);

Modified: subversion/branches/svn-bisect/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_diff/diff_file.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_diff/diff_file.c Wed Jul 20 13:06:00 2011
@@ -528,9 +528,11 @@ find_identical_suffix(apr_off_t *suffix_
   apr_off_t suffix_min_offset0;
   apr_off_t min_file_size;
   int suffix_lines_to_keep = SUFFIX_LINES_TO_KEEP;
-  svn_boolean_t is_match, reached_prefix;
+  svn_boolean_t is_match;
+  svn_boolean_t reached_prefix;
   apr_off_t lines = 0;
-  svn_boolean_t had_cr, had_nl;
+  svn_boolean_t had_cr;
+  svn_boolean_t had_nl;
   apr_size_t i;
 
   /* Initialize file_for_suffix[].
@@ -586,6 +588,7 @@ find_identical_suffix(apr_off_t *suffix_
     /* Count an extra line for the last line not ending in an eol. */
     lines++;
 
+  had_nl = FALSE;
   while (is_match)
     {
       /* Initialize the minimum pointer positions. */

Modified: subversion/branches/svn-bisect/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_diff/parse-diff.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_diff/parse-diff.c Wed Jul 20 13:06:00 2011
@@ -1394,5 +1394,5 @@ svn_diff_close_patch_file(svn_patch_file
                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(svn_io_file_close(patch_file->apr_file,
-                                            scratch_pool));
+                                           scratch_pool));
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.c Wed Jul 20 13:06:00 2011
@@ -459,6 +459,31 @@ svn_fs_upgrade(const char *path, apr_poo
   return svn_error_trace(err2);
 }
 
+svn_error_t *
+svn_fs_verify(const char *path,
+              svn_cancel_func_t cancel_func,
+              void *cancel_baton,
+              apr_pool_t *pool) 
+{
+  svn_error_t *err;
+  svn_error_t *err2;
+  fs_library_vtable_t *vtable;
+  svn_fs_t *fs;
+
+  SVN_ERR(fs_library_vtable(&vtable, path, pool));
+  fs = fs_new(NULL, pool);
+  SVN_ERR(acquire_fs_mutex());
+  err = vtable->verify_fs(fs, path, cancel_func, cancel_baton,
+                          pool, common_pool);
+  err2 = release_fs_mutex();
+  if (err)
+    {
+      svn_error_clear(err2);
+      return svn_error_trace(err);
+    }
+  return svn_error_trace(err2);
+}
+
 const char *
 svn_fs_path(svn_fs_t *fs, apr_pool_t *pool)
 {
@@ -603,7 +628,7 @@ svn_fs_hotcopy_berkeley(const char *src_
                         svn_boolean_t clean_logs, apr_pool_t *pool)
 {
   return svn_error_trace(svn_fs_hotcopy(src_path, dest_path, clean_logs,
-                                         pool));
+                                        pool));
 }
 
 svn_error_t *
@@ -629,7 +654,7 @@ svn_fs_berkeley_logfiles(apr_array_heade
 
   SVN_ERR(fs_library_vtable(&vtable, path, pool));
   return svn_error_trace(vtable->bdb_logfiles(logfiles, path, only_unused,
-                                               pool));
+                                              pool));
 }
 
 
@@ -863,7 +888,7 @@ svn_fs_node_history(svn_fs_history_t **h
                     const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_history(history_p, root, path,
-                                                     pool));
+                                                    pool));
 }
 
 svn_error_t *
@@ -900,7 +925,7 @@ svn_fs_node_created_rev(svn_revnum_t *re
                         const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_created_rev(revision, root, path,
-                                                         pool));
+                                                        pool));
 }
 
 svn_error_t *
@@ -908,7 +933,7 @@ svn_fs_node_origin_rev(svn_revnum_t *rev
                        const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_origin_rev(revision, root, path,
-                                                        pool));
+                                                       pool));
 }
 
 svn_error_t *
@@ -916,7 +941,7 @@ svn_fs_node_created_path(const char **cr
                          const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_created_path(created_path, root,
-                                                          path, pool));
+                                                         path, pool));
 }
 
 svn_error_t *
@@ -924,7 +949,7 @@ svn_fs_node_prop(svn_string_t **value_p,
                  const char *path, const char *propname, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_prop(value_p, root, path,
-                                                  propname, pool));
+                                                 propname, pool));
 }
 
 svn_error_t *
@@ -932,7 +957,7 @@ svn_fs_node_proplist(apr_hash_t **table_
                      const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->node_proplist(table_p, root, path,
-                                                      pool));
+                                                     pool));
 }
 
 svn_error_t *
@@ -941,7 +966,7 @@ svn_fs_change_node_prop(svn_fs_root_t *r
                         apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->change_node_prop(root, path, name,
-                                                         value, pool));
+                                                        value, pool));
 }
 
 svn_error_t *
@@ -950,9 +975,9 @@ svn_fs_props_changed(svn_boolean_t *chan
                      const char *path2, apr_pool_t *pool)
 {
   return svn_error_trace(root1->vtable->props_changed(changed_p,
-                                                       root1, path1,
-                                                       root2, path2,
-                                                       pool));
+                                                      root1, path1,
+                                                      root2, path2,
+                                                      pool));
 }
 
 svn_error_t *
@@ -960,7 +985,7 @@ svn_fs_copied_from(svn_revnum_t *rev_p, 
                    svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->copied_from(rev_p, path_p, root, path,
-                                                    pool));
+                                                   pool));
 }
 
 svn_error_t *
@@ -968,7 +993,7 @@ svn_fs_closest_copy(svn_fs_root_t **root
                     svn_fs_root_t *root, const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->closest_copy(root_p, path_p,
-                                                     root, path, pool));
+                                                    root, path, pool));
 }
 
 svn_error_t *
@@ -981,10 +1006,10 @@ svn_fs_get_mergeinfo2(svn_mergeinfo_cata
                       apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->get_mergeinfo(catalog, root, paths,
-                                                      inherit,
-                                                      validate_inherited_mergeinfo,
-                                                      include_descendants,
-                                                      pool));
+                                                     inherit,
+                                                     validate_inherited_mergeinfo,
+                                                     include_descendants,
+                                                     pool));
 }
 
 svn_error_t *
@@ -996,10 +1021,10 @@ svn_fs_get_mergeinfo(svn_mergeinfo_catal
                      apr_pool_t *pool)
 {
   return svn_error_trace(svn_fs_get_mergeinfo2(catalog, root, paths,
-                                                inherit,
-                                                FALSE,
-                                                include_descendants,
-                                                pool));
+                                               inherit,
+                                               FALSE,
+                                               include_descendants,
+                                               pool));
 }
 
 svn_error_t *
@@ -1010,9 +1035,9 @@ svn_fs_validate_mergeinfo(svn_mergeinfo_
                           apr_pool_t *scratch_pool)
 {
   return svn_error_trace(fs->vtable->validate_mergeinfo(validated_mergeinfo,
-                                                         fs, mergeinfo,
-                                                         result_pool,
-                                                         scratch_pool));
+                                                        fs, mergeinfo,
+                                                        result_pool,
+                                                        scratch_pool));
 }
 
 svn_error_t *
@@ -1022,10 +1047,10 @@ svn_fs_merge(const char **conflict_p, sv
              const char *ancestor_path, apr_pool_t *pool)
 {
   return svn_error_trace(target_root->vtable->merge(conflict_p,
-                                                     source_root, source_path,
-                                                     target_root, target_path,
-                                                     ancestor_root,
-                                                     ancestor_path, pool));
+                                                    source_root, source_path,
+                                                    target_root, target_path,
+                                                    ancestor_root,
+                                                    ancestor_path, pool));
 }
 
 svn_error_t *
@@ -1033,7 +1058,7 @@ svn_fs_dir_entries(apr_hash_t **entries_
                    const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->dir_entries(entries_p, root, path,
-                                                    pool));
+                                                   pool));
 }
 
 svn_error_t *
@@ -1055,7 +1080,7 @@ svn_fs_copy(svn_fs_root_t *from_root, co
 {
   SVN_ERR(svn_fs__path_valid(to_path, pool));
   return svn_error_trace(to_root->vtable->copy(from_root, from_path,
-                                                to_root, to_path, pool));
+                                               to_root, to_path, pool));
 }
 
 svn_error_t *
@@ -1063,7 +1088,7 @@ svn_fs_revision_link(svn_fs_root_t *from
                      const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(to_root->vtable->revision_link(from_root, to_root,
-                                                         path, pool));
+                                                        path, pool));
 }
 
 svn_error_t *
@@ -1071,7 +1096,7 @@ svn_fs_file_length(svn_filesize_t *lengt
                    const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->file_length(length_p, root, path,
-                                                    pool));
+                                                   pool));
 }
 
 svn_error_t *
@@ -1120,7 +1145,7 @@ svn_fs_file_contents(svn_stream_t **cont
                      const char *path, apr_pool_t *pool)
 {
   return svn_error_trace(root->vtable->file_contents(contents, root, path,
-                                                      pool));
+                                                     pool));
 }
 
 svn_error_t *
@@ -1146,12 +1171,12 @@ svn_fs_apply_textdelta(svn_txdelta_windo
                                  pool));
 
   return svn_error_trace(root->vtable->apply_textdelta(contents_p,
-                                                        contents_baton_p,
-                                                        root,
-                                                        path,
-                                                        base,
-                                                        result,
-                                                        pool));
+                                                       contents_baton_p,
+                                                       root,
+                                                       path,
+                                                       base,
+                                                       result,
+                                                       pool));
 }
 
 svn_error_t *
@@ -1167,7 +1192,7 @@ svn_fs_apply_text(svn_stream_t **content
                                  pool));
 
   return svn_error_trace(root->vtable->apply_text(contents_p, root, path,
-                                                   result, pool));
+                                                  result, pool));
 }
 
 svn_error_t *
@@ -1176,9 +1201,9 @@ svn_fs_contents_changed(svn_boolean_t *c
                         const char *path2, apr_pool_t *pool)
 {
   return svn_error_trace(root1->vtable->contents_changed(changed_p,
-                                                          root1, path1,
-                                                          root2, path2,
-                                                          pool));
+                                                         root1, path1,
+                                                         root2, path2,
+                                                         pool));
 }
 
 svn_error_t *
@@ -1198,7 +1223,7 @@ svn_fs_revision_prop(svn_string_t **valu
                      const char *propname, apr_pool_t *pool)
 {
   return svn_error_trace(fs->vtable->revision_prop(value_p, fs, rev,
-                                                    propname, pool));
+                                                   propname, pool));
 }
 
 svn_error_t *
@@ -1206,7 +1231,7 @@ svn_fs_revision_proplist(apr_hash_t **ta
                          apr_pool_t *pool)
 {
   return svn_error_trace(fs->vtable->revision_proplist(table_p, fs, rev,
-                                                        pool));
+                                                       pool));
 }
 
 svn_error_t *
@@ -1215,8 +1240,8 @@ svn_fs_change_rev_prop2(svn_fs_t *fs, sv
                         const svn_string_t *value, apr_pool_t *pool)
 {
   return svn_error_trace(fs->vtable->change_rev_prop(fs, rev, name,
-                                                      old_value_p,
-                                                      value, pool));
+                                                     old_value_p,
+                                                     value, pool));
 }
 
 svn_error_t *
@@ -1235,9 +1260,9 @@ svn_fs_get_file_delta_stream(svn_txdelta
                              const char *target_path, apr_pool_t *pool)
 {
   return svn_error_trace(target_root->vtable->get_file_delta_stream(
-                            stream_p,
-                            source_root, source_path,
-                            target_root, target_path, pool));
+                           stream_p,
+                           source_root, source_path,
+                           target_root, target_path, pool));
 }
 
 svn_error_t *
@@ -1286,8 +1311,8 @@ svn_fs_lock(svn_lock_t **lock, svn_fs_t 
            _("Negative expiration date passed to svn_fs_lock"));
 
   return svn_error_trace(fs->vtable->lock(lock, fs, path, token, comment,
-                                           is_dav_comment, expiration_date,
-                                           current_rev, steal_lock, pool));
+                                          is_dav_comment, expiration_date,
+                                          current_rev, steal_lock, pool));
 }
 
 svn_error_t *
@@ -1301,7 +1326,7 @@ svn_fs_unlock(svn_fs_t *fs, const char *
               svn_boolean_t break_lock, apr_pool_t *pool)
 {
   return svn_error_trace(fs->vtable->unlock(fs, path, token, break_lock,
-                                             pool));
+                                            pool));
 }
 
 svn_error_t *
@@ -1321,8 +1346,8 @@ svn_fs_get_locks2(svn_fs_t *fs, const ch
                  (depth == svn_depth_immediates) ||
                  (depth == svn_depth_infinity));
   return svn_error_trace(fs->vtable->get_locks(fs, path, depth,
-                                                get_locks_func,
-                                                get_locks_baton, pool));
+                                               get_locks_func,
+                                               get_locks_baton, pool));
 }
 
 svn_error_t *
@@ -1331,8 +1356,8 @@ svn_fs_get_locks(svn_fs_t *fs, const cha
                  void *get_locks_baton, apr_pool_t *pool)
 {
   return svn_error_trace(svn_fs_get_locks2(fs, path, svn_depth_infinity,
-                                            get_locks_func, get_locks_baton,
-                                            pool));
+                                           get_locks_func, get_locks_baton,
+                                           pool));
 }
 
 
@@ -1344,7 +1369,7 @@ svn_fs_history_prev(svn_fs_history_t **p
                     apr_pool_t *pool)
 {
   return svn_error_trace(history->vtable->prev(prev_history_p, history,
-                                                cross_copies, pool));
+                                               cross_copies, pool));
 }
 
 svn_error_t *
@@ -1352,7 +1377,7 @@ svn_fs_history_location(const char **pat
                         svn_fs_history_t *history, apr_pool_t *pool)
 {
   return svn_error_trace(history->vtable->location(path, revision, history,
-                                                    pool));
+                                                   pool));
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs/fs-loader.h Wed Jul 20 13:06:00 2011
@@ -86,6 +86,11 @@ typedef struct fs_library_vtable_t
                                        apr_pool_t *common_pool);
   svn_error_t *(*upgrade_fs)(svn_fs_t *fs, const char *path, apr_pool_t *pool,
                              apr_pool_t *common_pool);
+  svn_error_t *(*verify_fs)(svn_fs_t *fs, const char *path,
+                            /* ### notification? */
+                            svn_cancel_func_t cancel_func, void *cancel_baton,
+                            apr_pool_t *pool,
+                            apr_pool_t *common_pool);
   svn_error_t *(*delete_fs)(const char *path, apr_pool_t *pool);
   svn_error_t *(*hotcopy)(const char *src_path, const char *dest_path,
                           svn_boolean_t clean, apr_pool_t *pool);

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_base/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_base/fs.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_base/fs.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_base/fs.c Wed Jul 20 13:06:00 2011
@@ -669,9 +669,6 @@ base_create(svn_fs_t *fs, const char *pa
       else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
                                         APR_HASH_KEY_STRING))
         format = 3;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
-        format = 4;
     }
 
   /* Create the environment and databases. */
@@ -877,6 +874,18 @@ base_upgrade(svn_fs_t *fs, const char *p
 }
 
 static svn_error_t *
+base_verify(svn_fs_t *fs, const char *path,
+            svn_cancel_func_t cancel_func,
+            void *cancel_baton,
+            apr_pool_t *pool,
+            apr_pool_t *common_pool)
+{
+  /* ### Any boilerplate needed here? */
+  /* Verifying is currently a no op for BDB. */
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 base_bdb_recover(svn_fs_t *fs,
                  svn_cancel_func_t cancel_func, void *cancel_baton,
                  apr_pool_t *pool)
@@ -1345,6 +1354,7 @@ static fs_library_vtable_t library_vtabl
   base_open,
   base_open_for_recovery,
   base_upgrade,
+  base_verify,
   base_delete_fs,
   base_hotcopy,
   base_get_description,

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/caching.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/caching.c Wed Jul 20 13:06:00 2011
@@ -189,6 +189,52 @@ init_callbacks(svn_cache__t *cache,
   return SVN_NO_ERROR;
 }
 
+/* Sets *CACHE_P to cache instance based on provided options.
+ * Creates memcache if MEMCACHE is not NULL. Creates membuffer cache if
+ * MEMBUFFER is not NULL. Fallbacks to inprocess cache if MEMCACHE and
+ * MEMBUFFER are NULL and pages is non-zero.  Sets *CACHE_P to NULL
+ * otherwise.
+ *
+ * Cache is allocated in POOL.
+ * */
+static svn_error_t *
+create_cache(svn_cache__t **cache_p,
+             svn_memcache_t *memcache,
+             svn_membuffer_t *membuffer,
+             apr_int64_t pages,
+             apr_int64_t items_per_page,
+             svn_cache__serialize_func_t serializer,
+             svn_cache__deserialize_func_t deserializer,
+             apr_ssize_t klen,
+             const char *prefix,
+             apr_pool_t *pool)
+{
+    if (memcache)
+      {
+        SVN_ERR(svn_cache__create_memcache(cache_p, memcache,
+                                           serializer, deserializer, klen,
+                                           prefix, pool));
+      }
+    else if (membuffer)
+      {
+        SVN_ERR(svn_cache__create_membuffer_cache(
+                  cache_p, membuffer, serializer, deserializer,
+                  klen, prefix, pool));
+      }
+    else if (pages)
+      {
+        SVN_ERR(svn_cache__create_inprocess(
+                  cache_p, serializer, deserializer, klen, pages,
+                  items_per_page, FALSE, prefix, pool));
+      }
+    else
+    {
+      *cache_p = NULL;
+    }
+
+    return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_fs_fs__initialize_caches(svn_fs_t *fs,
                              apr_pool_t *pool)
@@ -199,6 +245,7 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                                    "/", fs->path, ":",
                                    (char *)NULL);
   svn_memcache_t *memcache;
+  svn_membuffer_t *membuffer;
   svn_boolean_t no_handler;
   svn_boolean_t cache_txdeltas;
   svn_boolean_t cache_fulltexts;
@@ -211,6 +258,8 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
                       fs,
                       pool));
 
+  membuffer = svn_cache__get_global_membuffer_cache();
+
   /* Make the cache for revision roots.  For the vast majority of
    * commands, this is only going to contain a few entries (svnadmin
    * dump/verify is an exception here), so to reduce overhead let's
@@ -219,92 +268,57 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
    * id_private_t + 3 strings for value, and the cache_entry); the
    * default pool size is 8192, so about a hundred should fit
    * comfortably. */
-  if (svn_cache__get_global_membuffer_cache())
-      SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->rev_root_id_cache),
-                                                svn_cache__get_global_membuffer_cache(),
-                                                svn_fs_fs__serialize_id,
-                                                svn_fs_fs__deserialize_id,
-                                                sizeof(svn_revnum_t),
-                                                apr_pstrcat(pool, prefix, "RRI",
-                                                            (char *)NULL),
-                                                fs->pool));
-  else
-      SVN_ERR(svn_cache__create_inprocess(&(ffd->rev_root_id_cache),
-                                          svn_fs_fs__serialize_id,
-                                          svn_fs_fs__deserialize_id,
-                                          sizeof(svn_revnum_t),
-                                          1, 100, FALSE,
-                                          apr_pstrcat(pool, prefix, "RRI",
-                                              (char *)NULL),
-                                          fs->pool));
+  SVN_ERR(create_cache(&(ffd->rev_root_id_cache),
+                       NULL,
+                       membuffer,
+                       1, 100,
+                       svn_fs_fs__serialize_id,
+                       svn_fs_fs__deserialize_id,
+                       sizeof(svn_revnum_t),
+                       apr_pstrcat(pool, prefix, "RRI", (char *)NULL),
+                       fs->pool));
 
   SVN_ERR(init_callbacks(ffd->rev_root_id_cache, fs, no_handler, pool));
 
   /* Rough estimate: revision DAG nodes have size around 320 bytes, so
    * let's put 16 on a page. */
-  if (svn_cache__get_global_membuffer_cache())
-    SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->rev_node_cache),
-                                              svn_cache__get_global_membuffer_cache(),
-                                              svn_fs_fs__dag_serialize,
-                                              svn_fs_fs__dag_deserialize,
-                                              APR_HASH_KEY_STRING,
-                                              apr_pstrcat(pool, prefix, "DAG",
-                                                          (char *)NULL),
-                                              fs->pool));
-  else
-    SVN_ERR(svn_cache__create_inprocess(&(ffd->rev_node_cache),
-                                        svn_fs_fs__dag_serialize,
-                                        svn_fs_fs__dag_deserialize,
-                                        APR_HASH_KEY_STRING,
-                                        1024, 16, FALSE,
-                                        apr_pstrcat(pool, prefix, "DAG",
-                                                    (char *)NULL),
-                                        fs->pool));
+  SVN_ERR(create_cache(&(ffd->rev_node_cache),
+                       NULL,
+                       membuffer,
+                       1024, 16,
+                       svn_fs_fs__dag_serialize,
+                       svn_fs_fs__dag_deserialize,
+                       APR_HASH_KEY_STRING,
+                       apr_pstrcat(pool, prefix, "DAG", (char *)NULL),
+                       fs->pool));
 
   SVN_ERR(init_callbacks(ffd->rev_node_cache, fs, no_handler, pool));
 
   /* Very rough estimate: 1K per directory. */
-  if (svn_cache__get_global_membuffer_cache())
-    SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->dir_cache),
-                                              svn_cache__get_global_membuffer_cache(),
-                                              svn_fs_fs__serialize_dir_entries,
-                                              svn_fs_fs__deserialize_dir_entries,
-                                              APR_HASH_KEY_STRING,
-                                              apr_pstrcat(pool, prefix, "DIR",
-                                                          (char *)NULL),
-                                              fs->pool));
-  else
-    SVN_ERR(svn_cache__create_inprocess(&(ffd->dir_cache),
-                                        svn_fs_fs__serialize_dir_entries,
-                                        svn_fs_fs__deserialize_dir_entries,
-                                        APR_HASH_KEY_STRING,
-                                        1024, 8, FALSE,
-                                        apr_pstrcat(pool, prefix, "DIR",
-                                            (char *)NULL),
-                                        fs->pool));
+  SVN_ERR(create_cache(&(ffd->dir_cache),
+                       NULL,
+                       membuffer,
+                       1024, 8,
+                       svn_fs_fs__serialize_dir_entries,
+                       svn_fs_fs__deserialize_dir_entries,
+                       APR_HASH_KEY_STRING,
+                       apr_pstrcat(pool, prefix, "DIR", (char *)NULL),
+                       fs->pool));
 
   SVN_ERR(init_callbacks(ffd->dir_cache, fs, no_handler, pool));
 
   /* Only 16 bytes per entry (a revision number + the corresponding offset).
      Since we want ~8k pages, that means 512 entries per page. */
-  if (svn_cache__get_global_membuffer_cache())
-    SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->packed_offset_cache),
-                                              svn_cache__get_global_membuffer_cache(),
-                                              svn_fs_fs__serialize_manifest,
-                                              svn_fs_fs__deserialize_manifest,
-                                              sizeof(svn_revnum_t),
-                                              apr_pstrcat(pool, prefix, "PACK-MANIFEST",
-                                                          (char *)NULL),
-                                              fs->pool));
-  else
-    SVN_ERR(svn_cache__create_inprocess(&(ffd->packed_offset_cache),
-                                        svn_fs_fs__serialize_manifest,
-                                        svn_fs_fs__deserialize_manifest,
-                                        sizeof(svn_revnum_t),
-                                        32, 1, FALSE,
-                                        apr_pstrcat(pool, prefix, "PACK-MANIFEST",
-                                                    (char *)NULL),
-                                        fs->pool));
+  SVN_ERR(create_cache(&(ffd->packed_offset_cache),
+                       NULL,
+                       membuffer,
+                       32, 1,
+                       svn_fs_fs__serialize_manifest,
+                       svn_fs_fs__deserialize_manifest,
+                       sizeof(svn_revnum_t),
+                       apr_pstrcat(pool, prefix, "PACK-MANIFEST",
+                                   (char *)NULL),
+                       fs->pool));
 
   SVN_ERR(init_callbacks(ffd->packed_offset_cache, fs, no_handler, pool));
 
@@ -312,43 +326,32 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   ffd->fulltext_cache = NULL;
   if (cache_fulltexts)
     {
-      if (memcache)
-        {
-          SVN_ERR(svn_cache__create_memcache(&(ffd->fulltext_cache),
-                                            memcache,
-                                            /* Values are svn_string_t */
-                                            NULL, NULL,
-                                            APR_HASH_KEY_STRING,
-                                            apr_pstrcat(pool, prefix, "TEXT",
-                                                        (char *)NULL),
-                                            fs->pool));
-        }
-      else if (svn_cache__get_global_membuffer_cache())
-        {
-          SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->fulltext_cache),
-                                                    svn_cache__get_global_membuffer_cache(),
-                                                    /* Values are svn_string_t */
-                                                    NULL, NULL,
-                                                    APR_HASH_KEY_STRING,
-                                                    apr_pstrcat(pool, prefix, "TEXT",
-                                                                (char *)NULL),
-                                                    fs->pool));
-        }
+      SVN_ERR(create_cache(&(ffd->fulltext_cache),
+                           memcache,
+                           membuffer,
+                           0, 0, /* Do not use inprocess cache */
+                           /* Values are svn_string_t */
+                           NULL, NULL,
+                           APR_HASH_KEY_STRING,
+                           apr_pstrcat(pool, prefix, "TEXT", (char *)NULL),
+                           fs->pool));
     }
 
   SVN_ERR(init_callbacks(ffd->fulltext_cache, fs, no_handler, pool));
 
   /* initialize txdelta window cache, if that has been enabled */
-  if (svn_cache__get_global_membuffer_cache() && cache_txdeltas)
+  if (cache_txdeltas)
     {
-      SVN_ERR(svn_cache__create_membuffer_cache
-                (&(ffd->txdelta_window_cache),
-                 svn_cache__get_global_membuffer_cache(),
-                 svn_fs_fs__serialize_txdelta_window,
-                 svn_fs_fs__deserialize_txdelta_window,
-                 APR_HASH_KEY_STRING,
-                 apr_pstrcat(pool, prefix, "TXDELTA_WINDOW", (char *)NULL),
-                 fs->pool));
+      SVN_ERR(create_cache(&(ffd->txdelta_window_cache),
+                           NULL,
+                           membuffer,
+                           0, 0, /* Do not use inprocess cache */
+                           svn_fs_fs__serialize_txdelta_window,
+                           svn_fs_fs__deserialize_txdelta_window,
+                           APR_HASH_KEY_STRING,
+                           apr_pstrcat(pool, prefix, "TXDELTA_WINDOW",
+                                       (char *)NULL),
+                           fs->pool));
     }
   else
     {
@@ -358,23 +361,15 @@ svn_fs_fs__initialize_caches(svn_fs_t *f
   SVN_ERR(init_callbacks(ffd->txdelta_window_cache, fs, no_handler, pool));
 
   /* initialize node revision cache, if caching has been enabled */
-  if (svn_cache__get_global_membuffer_cache())
-    {
-      SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->node_revision_cache),
-                                                svn_cache__get_global_membuffer_cache(),
-                                                svn_fs_fs__serialize_node_revision,
-                                                svn_fs_fs__deserialize_node_revision,
-                                                APR_HASH_KEY_STRING,
-                                                apr_pstrcat(pool,
-                                                            prefix,
-                                                            "NODEREVS",
-                                                            (char *)NULL),
-                                                fs->pool));
-    }
-  else
-    {
-      ffd->node_revision_cache = NULL;
-    }
+  SVN_ERR(create_cache(&(ffd->node_revision_cache),
+                       NULL,
+                       membuffer,
+                       0, 0, /* Do not use inprocess cache */
+                       svn_fs_fs__serialize_node_revision,
+                       svn_fs_fs__deserialize_node_revision,
+                       APR_HASH_KEY_STRING,
+                       apr_pstrcat(pool, prefix, "NODEREVS", (char *)NULL),
+                       fs->pool));
 
   SVN_ERR(init_callbacks(ffd->node_revision_cache, fs, no_handler, pool));
 
@@ -462,24 +457,16 @@ svn_fs_fs__initialize_txn_caches(svn_fs_
     }
 
   /* create a txn-local directory cache */
-  if (svn_cache__get_global_membuffer_cache())
-    SVN_ERR(svn_cache__create_membuffer_cache(&(ffd->txn_dir_cache),
-                                              svn_cache__get_global_membuffer_cache(),
-                                              svn_fs_fs__serialize_dir_entries,
-                                              svn_fs_fs__deserialize_dir_entries,
-                                              APR_HASH_KEY_STRING,
-                                              apr_pstrcat(pool, prefix, "TXNDIR",
-                                                          (char *)NULL),
-                                              pool));
-  else
-    SVN_ERR(svn_cache__create_inprocess(&(ffd->txn_dir_cache),
-                                        svn_fs_fs__serialize_dir_entries,
-                                        svn_fs_fs__deserialize_dir_entries,
-                                        APR_HASH_KEY_STRING,
-                                        1024, 8, FALSE,
-                                        apr_pstrcat(pool, prefix, "TXNDIR",
-                                            (char *)NULL),
-                                        pool));
+  SVN_ERR(create_cache(&ffd->txn_dir_cache,
+                       NULL,
+                       svn_cache__get_global_membuffer_cache(),
+                       1024, 8,
+                       svn_fs_fs__serialize_dir_entries,
+                       svn_fs_fs__deserialize_dir_entries,
+                       APR_HASH_KEY_STRING,
+                       apr_pstrcat(pool, prefix, "TXNDIR",
+                                   (char *)NULL),
+                       pool));
 
   /* reset the transaction-specific cache if the pool gets cleaned up. */
   init_txn_callbacks(&(ffd->txn_dir_cache), pool);

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.c Wed Jul 20 13:06:00 2011
@@ -256,6 +256,21 @@ fs_upgrade(svn_fs_t *fs, const char *pat
 }
 
 static svn_error_t *
+fs_verify(svn_fs_t *fs, const char *path,
+          svn_cancel_func_t cancel_func,
+          void *cancel_baton,
+          apr_pool_t *pool,
+          apr_pool_t *common_pool)
+{
+  SVN_ERR(svn_fs__check_fs(fs, FALSE));
+  SVN_ERR(initialize_fs_struct(fs));
+  SVN_ERR(svn_fs_fs__open(fs, path, pool));
+  SVN_ERR(svn_fs_fs__initialize_caches(fs, pool));
+  SVN_ERR(fs_serialized_init(fs, common_pool, pool));
+  return svn_fs_fs__verify(fs, cancel_func, cancel_baton, pool);
+}
+
+static svn_error_t *
 fs_pack(svn_fs_t *fs,
         const char *path,
         svn_fs_pack_notify_t notify_func,
@@ -342,6 +357,7 @@ static fs_library_vtable_t library_vtabl
   fs_open,
   fs_open_for_recovery,
   fs_upgrade,
+  fs_verify,
   fs_delete_fs,
   fs_hotcopy,
   fs_get_description,

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs.h Wed Jul 20 13:06:00 2011
@@ -60,10 +60,6 @@ extern "C" {
 #define PATH_LOCKS_DIR        "locks"            /* Directory of locks */
 #define PATH_MIN_UNPACKED_REV "min-unpacked-rev" /* Oldest revision which
                                                     has not been packed. */
-#define PATH_MIN_UNPACKED_REVPROP "min-unpacked-revprop" /* Oldest revision
-                                                            property which has
-                                                            not been packed. */
-#define PATH_REVPROPS_DB "revprops.db"
 /* If you change this, look at tests/svn_test_fs.c(maybe_install_fsfs_conf) */
 #define PATH_CONFIG           "fsfs.conf"        /* Configuration */
 
@@ -90,7 +86,7 @@ extern "C" {
 /* The format number of this filesystem.
    This is independent of the repository format number, and
    independent of any other FS back ends. */
-#define SVN_FS_FS__FORMAT_NUMBER   5
+#define SVN_FS_FS__FORMAT_NUMBER   4
 
 /* The minimum format number that supports svndiff version 1.  */
 #define SVN_FS_FS__MIN_SVNDIFF1_FORMAT 2
@@ -122,8 +118,12 @@ extern "C" {
 /* The minimum format number that stores node kinds in changed-paths lists. */
 #define SVN_FS_FS__MIN_KIND_IN_CHANGED_FORMAT 4
 
+/* The 1.7-dev format, never released, that packed revprops into SQLite
+   revprops.db . */
+#define SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT 5
+
 /* The minimum format number that supports packed revprop shards. */
-#define SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT 5
+#define SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT
 
 /* The minimum format number that supports a configuration file (fsfs.conf) */
 #define SVN_FS_FS__MIN_CONFIG_FILE 4
@@ -266,15 +266,9 @@ typedef struct fs_fs_data_t
   /* Thread-safe boolean */
   svn_atomic_t rep_cache_db_opened;
 
-   /* The sqlite database used for revprops. */
-   svn_sqlite__db_t *revprop_db;
-
   /* The oldest revision not in a pack file. */
   svn_revnum_t min_unpacked_rev;
 
-   /* The oldest revision property not in a pack db. */
-   svn_revnum_t min_unpacked_revprop;
-
   /* Whether rep-sharing is supported by the filesystem
    * and allowed by the configuration. */
   svn_boolean_t rep_sharing_allowed;

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.c Wed Jul 20 13:06:00 2011
@@ -59,8 +59,6 @@
 #include "rep-cache.h"
 #include "temp_serializer.h"
 
-#include "revprops-db.h"
-
 #include "private/svn_fs_util.h"
 #include "../libsvn_fs/fs-loader.h"
 
@@ -139,9 +137,6 @@ static txn_vtable_t txn_vtable = {
   svn_fs_fs__change_txn_props
 };
 
-/* SQL bits for revprops. */
-REVPROPS_DB_SQL_DECLARE_STATEMENTS(statements);
-
 /* Declarations. */
 
 static svn_error_t *
@@ -152,9 +147,6 @@ read_min_unpacked_rev(svn_revnum_t *min_
 static svn_error_t *
 update_min_unpacked_rev(svn_fs_t *fs, apr_pool_t *pool);
 
-static svn_error_t *
-update_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool);
-
 /* Pathname helper functions */
 
 /* Return TRUE is REV is packed in FS, FALSE otherwise. */
@@ -166,6 +158,19 @@ is_packed_rev(svn_fs_t *fs, svn_revnum_t
   return (rev < ffd->min_unpacked_rev);
 }
 
+/* Return TRUE is REV is packed in FS, FALSE otherwise. */
+static svn_boolean_t
+is_packed_revprop(svn_fs_t *fs, svn_revnum_t rev)
+{
+#if 0
+  fs_fs_data_t *ffd = fs->fsap_data;
+
+  return (rev < ffd->min_unpacked_revprop);
+#else
+  return FALSE;
+#endif
+}
+
 static const char *
 path_format(svn_fs_t *fs, apr_pool_t *pool)
 {
@@ -330,12 +335,6 @@ path_min_unpacked_rev(svn_fs_t *fs, apr_
   return svn_dirent_join(fs->path, PATH_MIN_UNPACKED_REV, pool);
 }
 
-static APR_INLINE const char *
-path_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool)
-{
-  return svn_dirent_join(fs->path, PATH_MIN_UNPACKED_REVPROP, pool);
-}
-
 
 static APR_INLINE const char *
 path_txn_proto_rev(svn_fs_t *fs, const char *txn_id, apr_pool_t *pool)
@@ -591,8 +590,6 @@ with_some_lock(svn_fs_t *fs,
       fs_fs_data_t *ffd = fs->fsap_data;
       if (ffd->format >= SVN_FS_FS__MIN_PACKED_FORMAT)
         SVN_ERR(update_min_unpacked_rev(fs, pool));
-      if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-        SVN_ERR(update_min_unpacked_revprop(fs, pool));
 #if 0 /* Might be a good idea? */
       SVN_ERR(get_youngest(&ffd->youngest_rev_cache, fs->path,
                            pool));
@@ -1068,6 +1065,16 @@ write_format(const char *path, int forma
 static svn_error_t *
 check_format(int format)
 {
+  /* Blacklist.  These formats may be either younger or older than
+     SVN_FS_FS__FORMAT_NUMBER, but we don't support them. */
+  if (format == SVN_FS_FS__PACKED_REVPROP_SQLITE_DEV_FORMAT)
+    return svn_error_createf(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL,
+                             _("Found format '%d', only created by "
+                               "unreleased dev builds; see "
+                               "http://subversion.apache.org"
+                               "/docs/release-notes/1.7#revprop-packing"),
+                             format);
+
   /* We support all formats from 1-current simultaneously */
   if (1 <= format && format <= SVN_FS_FS__FORMAT_NUMBER)
     return SVN_NO_ERROR;
@@ -1147,6 +1154,7 @@ write_config(svn_fs_t *fs,
 "### The following parameter enables rep-sharing in the repository.  It can" NL
 "### be switched on and off at will, but for best space-saving results"      NL
 "### should be enabled consistently over the life of the repository."        NL
+"### 'svnadmin verify' will check the rep-cache regardless of this setting." NL
 "### rep-sharing is enabled by default."                                     NL
 "# " CONFIG_OPTION_ENABLE_REP_SHARING " = true"                              NL
 
@@ -1188,40 +1196,6 @@ update_min_unpacked_rev(svn_fs_t *fs, ap
 }
 
 static svn_error_t *
-update_min_unpacked_revprop(svn_fs_t *fs, apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT);
-
-  return read_min_unpacked_rev(&ffd->min_unpacked_revprop,
-                               path_min_unpacked_revprop(fs, pool),
-                               pool);
-}
-
-/* Create a new SQLite database for storing the revprops in filesystem FS.
- * Leave the DB open and set *SDB to its handle.  Also create the "min
- * unpacked revprop" file. */
-static svn_error_t *
-create_packed_revprops_db(svn_sqlite__db_t **sdb,
-                          svn_fs_t *fs,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
-{
-  SVN_ERR(svn_io_file_create(path_min_unpacked_revprop(fs, scratch_pool),
-                             "0\n", scratch_pool));
-  SVN_ERR(svn_sqlite__open(sdb,
-                           svn_dirent_join_many(scratch_pool, fs->path,
-                                                PATH_REVPROPS_DIR,
-                                                PATH_REVPROPS_DB,
-                                                NULL),
-                           svn_sqlite__mode_rwcreate, statements,
-                           0, NULL, result_pool, scratch_pool));
-  SVN_ERR(svn_sqlite__exec_statements(*sdb, STMT_CREATE_SCHEMA));
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
 get_youngest(svn_revnum_t *youngest_p, const char *fs_path, apr_pool_t *pool);
 
 svn_error_t *
@@ -1238,11 +1212,11 @@ svn_fs_fs__open(svn_fs_t *fs, const char
   /* Read the FS format number. */
   SVN_ERR(read_format(&format, &max_files_per_dir,
                       path_format(fs, pool), pool));
+  SVN_ERR(check_format(format));
 
   /* Now we've got a format number no matter what. */
   ffd->format = format;
   ffd->max_files_per_dir = max_files_per_dir;
-  SVN_ERR(check_format(format));
 
   /* Read in and cache the repository uuid. */
   SVN_ERR(svn_io_file_open(&uuid_file, path_uuid(fs, pool),
@@ -1261,21 +1235,6 @@ svn_fs_fs__open(svn_fs_t *fs, const char
   /* Read the configuration file. */
   SVN_ERR(read_config(fs, pool));
 
-  /* Open the revprops db. */
-  if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      SVN_ERR(update_min_unpacked_revprop(fs, pool));
-
-      SVN_ERR(svn_sqlite__open(&ffd->revprop_db, svn_dirent_join_many(
-                                                    pool, path,
-                                                    PATH_REVPROPS_DIR,
-                                                    PATH_REVPROPS_DB,
-                                                    NULL),
-                               svn_sqlite__mode_readwrite, statements,
-                               0, NULL,
-                               fs->pool, pool));
-    }
-
   return get_youngest(&(ffd->youngest_rev_cache), path, pool);
 }
 
@@ -1298,13 +1257,13 @@ static svn_error_t *
 upgrade_body(void *baton, apr_pool_t *pool)
 {
   svn_fs_t *fs = baton;
-  fs_fs_data_t *ffd = fs->fsap_data;
   int format, max_files_per_dir;
   const char *format_path = path_format(fs, pool);
   svn_node_kind_t kind;
 
   /* Read the FS format number and max-files-per-dir setting. */
   SVN_ERR(read_format(&format, &max_files_per_dir, format_path, pool));
+  SVN_ERR(check_format(format));
 
   /* If the config file does not exist, create one. */
   SVN_ERR(svn_io_check_path(svn_dirent_join(fs->path, PATH_CONFIG, pool),
@@ -1352,13 +1311,6 @@ upgrade_body(void *baton, apr_pool_t *po
   if (format < SVN_FS_FS__MIN_PACKED_FORMAT)
     SVN_ERR(svn_io_file_create(path_min_unpacked_rev(fs, pool), "0\n", pool));
 
-  /* If our filesystem is new enough, write the min unpacked revprop file,
-     and create the database. */
-  if (format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      SVN_ERR(create_packed_revprops_db(&ffd->revprop_db, fs, fs->pool, pool));
-    }
-
   /* Bump the format file. */
   return write_format(format_path, SVN_FS_FS__FORMAT_NUMBER, max_files_per_dir,
                       TRUE, pool);
@@ -1519,7 +1471,7 @@ svn_fs_fs__hotcopy(const char *src_path,
                    apr_pool_t *pool)
 {
   const char *src_subdir, *dst_subdir;
-  svn_revnum_t youngest, rev, min_unpacked_rev, min_unpacked_revprop;
+  svn_revnum_t youngest, rev, min_unpacked_rev;
   apr_pool_t *iterpool;
   svn_node_kind_t kind;
   int format, max_files_per_dir;
@@ -1674,40 +1626,13 @@ svn_fs_fs__hotcopy(const char *src_path,
       svn_pool_clear(iterpool);
     }
 
-  /* Copy the min unpacked revprop file, and read its value. */
-  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      const char *min_unpacked_revprop_path;
-      min_unpacked_revprop_path = svn_dirent_join(src_path,
-                                                  PATH_MIN_UNPACKED_REVPROP,
-                                                  pool);
-      SVN_ERR(svn_io_dir_file_copy(src_path, dst_path,
-                                   PATH_MIN_UNPACKED_REVPROP, pool));
-      SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
-                                    min_unpacked_revprop_path, pool));
-    }
-  else
-    {
-      min_unpacked_revprop = 0;
-    }
-
   /* Copy the necessary revprop files. */
   src_subdir = svn_dirent_join(src_path, PATH_REVPROPS_DIR, pool);
   dst_subdir = svn_dirent_join(dst_path, PATH_REVPROPS_DIR, pool);
 
   SVN_ERR(svn_io_make_dir_recursively(dst_subdir, pool));
 
-  /* Copy the packed revprop db. */
-  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      const char *src_file = svn_dirent_join(src_subdir, PATH_REVPROPS_DB,
-                                             pool);
-      const char *dst_file = svn_dirent_join(dst_subdir, PATH_REVPROPS_DB,
-                                             pool);
-      SVN_ERR(svn_sqlite__hotcopy(src_file, dst_file, pool));
-    }
-
-  for (rev = min_unpacked_revprop; rev <= youngest; rev++)
+  for (rev = 0; rev <= youngest; rev++)
     {
       const char *src_subdir_shard = src_subdir,
                  *dst_subdir_shard = dst_subdir;
@@ -3016,13 +2941,9 @@ set_revision_proplist(svn_fs_t *fs,
                       apr_hash_t *proplist,
                       apr_pool_t *pool)
 {
-  fs_fs_data_t *ffd = fs->fsap_data;
-  svn_sqlite__stmt_t *stmt;
-
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
-  if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
-      rev >= ffd->min_unpacked_revprop)
+  if (1)
     {
       const char *final_path = path_revprops(fs, rev, pool);
       const char *tmp_path;
@@ -3047,12 +2968,7 @@ set_revision_proplist(svn_fs_t *fs,
       return SVN_NO_ERROR;
     }
 
-  SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db, STMT_SET_REVPROP));
-
-  SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
-  SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
-
-  return svn_error_trace(svn_sqlite__insert(NULL, stmt));
+  return SVN_NO_ERROR;
 }
 
 static svn_error_t *
@@ -3061,13 +2977,11 @@ revision_proplist(apr_hash_t **proplist_
                   svn_revnum_t rev,
                   apr_pool_t *pool)
 {
-  fs_fs_data_t *ffd = fs->fsap_data;
   apr_hash_t *proplist;
 
   SVN_ERR(ensure_revision_exists(fs, rev, pool));
 
-  if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
-      rev >= ffd->min_unpacked_revprop)
+  if (1)
     {
       apr_file_t *revprop_file = NULL;
       svn_error_t *err = SVN_NO_ERROR;
@@ -3120,22 +3034,6 @@ revision_proplist(apr_hash_t **proplist_
         return svn_error_trace(err);
       svn_pool_destroy(iterpool);
     }
-  else
-    {
-      svn_sqlite__stmt_t *stmt;
-      svn_boolean_t have_row;
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db,
-                                        STMT_GET_REVPROP));
-      SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
-      SVN_ERR(svn_sqlite__step(&have_row, stmt));
-      if (!have_row)
-        return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
-                                 _("No such revision %ld"), rev);
-
-      SVN_ERR(svn_sqlite__column_properties(&proplist, stmt, 0, pool, pool));
-      SVN_ERR(svn_sqlite__reset(stmt));
-    }
 
   *proplist_p = proplist;
 
@@ -3148,22 +3046,7 @@ svn_fs_fs__revision_proplist(apr_hash_t 
                              svn_revnum_t rev,
                              apr_pool_t *pool)
 {
-  svn_error_t *err;
-  fs_fs_data_t *ffd = fs->fsap_data;
-
-  err = revision_proplist(proplist_p, fs, rev, pool);
-  if (err && err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION
-      && ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      /* If a pack is occurring simultaneously, the min-unpacked-revprop value
-         could change, so reload it and then attempt to fetch these revprops
-         again. */
-      svn_error_clear(err);
-      SVN_ERR(update_min_unpacked_revprop(fs, pool));
-      SVN_ERR(revision_proplist(proplist_p, fs, rev, pool));
-    }
-  else if (err)
-    return svn_error_trace(err);
+  SVN_ERR(revision_proplist(proplist_p, fs, rev, pool));
 
   return SVN_NO_ERROR;
 }
@@ -3249,8 +3132,10 @@ create_rep_state(struct rep_state **rep_
          ### going to jump straight to this comment anyway! */
       return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                                "Corrupt representation '%s'",
-                               representation_string(rep, ffd->format, TRUE,
-                                                     pool));
+                               rep 
+                               ? representation_string(rep, ffd->format, TRUE,
+                                                       pool)
+                               : "(null)");
     }
   /* ### Call representation_string() ? */
   return svn_error_trace(err);
@@ -5448,7 +5333,7 @@ write_change_entry(apr_file_t *file,
 
   if (include_node_kind)
     {
-      assert(change->node_kind == svn_node_dir
+      SVN_ERR_ASSERT(change->node_kind == svn_node_dir
                      || change->node_kind == svn_node_file);
       kind_string = apr_psprintf(pool, "-%s",
                                  change->node_kind == svn_node_dir
@@ -6475,24 +6360,26 @@ commit_body(void *baton, apr_pool_t *poo
      fails because the shard already existed for some reason. */
   if (ffd->max_files_per_dir && new_rev % ffd->max_files_per_dir == 0)
     {
-      svn_error_t *err;
-      const char *new_dir = path_rev_shard(cb->fs, new_rev, pool);
-      err = svn_io_dir_make(new_dir, APR_OS_DEFAULT, pool);
-      if (err && !APR_STATUS_IS_EEXIST(err->apr_err))
-        return svn_error_trace(err);
-      svn_error_clear(err);
-      SVN_ERR(svn_io_copy_perms(svn_dirent_join(cb->fs->path,
-                                                PATH_REVS_DIR,
-                                                pool),
-                                new_dir, pool));
+      if (1)
+        {
+          const char *new_dir = path_rev_shard(cb->fs, new_rev, pool);
+          svn_error_t *err = svn_io_dir_make(new_dir, APR_OS_DEFAULT, pool);
+          if (err && !APR_STATUS_IS_EEXIST(err->apr_err))
+            return svn_error_trace(err);
+          svn_error_clear(err);
+          SVN_ERR(svn_io_copy_perms(svn_dirent_join(cb->fs->path,
+                                                    PATH_REVS_DIR,
+                                                    pool),
+                                    new_dir, pool));
+        }
 
-      if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
-          new_rev >= ffd->min_unpacked_revprop)
+      /* Create the revprops shard. */
+      SVN_ERR_ASSERT(! is_packed_revprop(cb->fs, new_rev));
         {
-          new_dir = path_revprops_shard(cb->fs, new_rev, pool);
-          err = svn_io_dir_make(new_dir, APR_OS_DEFAULT, pool);
+          const char *new_dir = path_revprops_shard(cb->fs, new_rev, pool);
+          svn_error_t *err = svn_io_dir_make(new_dir, APR_OS_DEFAULT, pool);
           if (err && !APR_STATUS_IS_EEXIST(err->apr_err))
-            SVN_ERR(err);
+            return svn_error_trace(err);
           svn_error_clear(err);
           SVN_ERR(svn_io_copy_perms(svn_dirent_join(cb->fs->path,
                                                     PATH_REVPROPS_DIR,
@@ -6522,29 +6409,12 @@ commit_body(void *baton, apr_pool_t *poo
   SVN_ERR(svn_fs_fs__change_txn_prop(cb->txn, SVN_PROP_REVISION_DATE,
                                      &date, pool));
 
-  if (ffd->format < SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT ||
-      new_rev >= ffd->min_unpacked_revprop)
-    {
-      /* Move the revprops file into place. */
-      revprop_filename = path_txn_props(cb->fs, cb->txn->id, pool);
-      final_revprop = path_revprops(cb->fs, new_rev, pool);
-      SVN_ERR(move_into_place(revprop_filename, final_revprop,
-                              old_rev_filename, pool));
-    }
-  else
-    {
-      /* Read the revprops, and commit them to the permenant sqlite db. */
-      apr_hash_t *proplist = apr_hash_make(pool);
-      svn_sqlite__stmt_t *stmt;
-
-      SVN_ERR(get_txn_proplist(proplist, cb->fs, cb->txn->id, pool));
-
-      SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db,
-                                        STMT_SET_REVPROP));
-      SVN_ERR(svn_sqlite__bind_int64(stmt, 1, new_rev));
-      SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
-      SVN_ERR(svn_sqlite__insert(NULL, stmt));
-    }
+  /* Move the revprops file into place. */
+  SVN_ERR_ASSERT(! is_packed_revprop(cb->fs, new_rev));
+  revprop_filename = path_txn_props(cb->fs, cb->txn->id, pool);
+  final_revprop = path_revprops(cb->fs, new_rev, pool);
+  SVN_ERR(move_into_place(revprop_filename, final_revprop,
+                          old_rev_filename, pool));
 
   /* Update the 'current' file. */
   SVN_ERR(write_final_current(cb->fs, cb->txn->id, new_rev, start_node_id,
@@ -6717,9 +6587,6 @@ svn_fs_fs__create(svn_fs_t *fs,
       else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
                                         APR_HASH_KEY_STRING))
         format = 3;
-      else if (apr_hash_get(fs->config, SVN_FS_CONFIG_PRE_1_7_COMPATIBLE,
-                                        APR_HASH_KEY_STRING))
-        format = 4;
     }
   ffd->format = format;
 
@@ -6745,12 +6612,6 @@ svn_fs_fs__create(svn_fs_t *fs,
                                                         pool),
                                         pool));
 
-  /* Write the min unpacked revprop file, and create the database. */
-  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      SVN_ERR(create_packed_revprops_db(&ffd->revprop_db, fs, fs->pool, pool));
-    }
-
   /* Create the transaction directory. */
   SVN_ERR(svn_io_make_dir_recursively(svn_dirent_join(path, PATH_TXNS_DIR,
                                                       pool),
@@ -7020,12 +6881,12 @@ recover_find_max_ids(svn_fs_t *fs, svn_r
 
       if (svn_fs_fs__key_compare(node_id, max_node_id) > 0)
         {
-          assert(strlen(node_id) < MAX_KEY_SIZE);
+          SVN_ERR_ASSERT(strlen(node_id) < MAX_KEY_SIZE);
           apr_cpystrn(max_node_id, node_id, MAX_KEY_SIZE);
         }
       if (svn_fs_fs__key_compare(copy_id, max_copy_id) > 0)
         {
-          assert(strlen(copy_id) < MAX_KEY_SIZE);
+          SVN_ERR_ASSERT(strlen(copy_id) < MAX_KEY_SIZE);
           apr_cpystrn(max_copy_id, copy_id, MAX_KEY_SIZE);
         }
 
@@ -7154,25 +7015,7 @@ recover_body(void *baton, apr_pool_t *po
                             &youngest_revprops_kind, pool));
   if (youngest_revprops_kind == svn_node_none)
     {
-      svn_boolean_t uhohs = TRUE;
-
-      /* No file?  Hrm... maybe that's because this repository is
-         packed and the youngest revision is in the revprops.db
-         file?  We can at least see if that's a possibility.
-
-         ### TODO: Could we check for revprops in the revprops.db?
-         ###       What if rNNN legitimately has no revprops? */
-      if (ffd->format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-        {
-          svn_revnum_t min_unpacked_revprop;
-
-          SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
-                                        path_min_unpacked_revprop(fs, pool),
-                                        pool));
-          if (min_unpacked_revprop == (max_rev + 1))
-            uhohs = FALSE;
-        }
-      if (uhohs)
+      if (1)
         {
           return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                    _("Revision %ld has a revs file but no "
@@ -7834,69 +7677,6 @@ pack_shard(const char *revs_dir,
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-pack_revprop_shard(svn_fs_t *fs,
-                   const char *revprops_dir,
-                   const char *fs_path,
-                   apr_int64_t shard,
-                   int max_files_per_dir,
-                   svn_fs_pack_notify_t notify_func,
-                   void *notify_baton,
-                   svn_cancel_func_t cancel_func,
-                   void *cancel_baton,
-                   apr_pool_t *pool)
-{
-  fs_fs_data_t *ffd = fs->fsap_data;
-  const char *shard_path;
-  svn_revnum_t start_rev, end_rev, rev;
-  svn_sqlite__stmt_t *stmt;
-  apr_pool_t *iterpool;
-
-  shard_path = svn_dirent_join(revprops_dir,
-                               apr_psprintf(pool, "%" APR_INT64_T_FMT, shard),
-                               pool);
-
-  /* Notify caller we're starting to pack this shard. */
-  if (notify_func)
-    SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_start_revprop,
-                        pool));
-
-  start_rev = (svn_revnum_t) (shard * max_files_per_dir);
-  end_rev = (svn_revnum_t) ((shard + 1) * (max_files_per_dir) - 1);
-  iterpool = svn_pool_create(pool);
-
-  /* Iterate over the revisions in this shard, squashing them together. */
-  SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->revprop_db, STMT_SET_REVPROP));
-  for (rev = start_rev; rev <= end_rev; rev++)
-    {
-      apr_hash_t *proplist;
-      svn_pool_clear(iterpool);
-
-      SVN_ERR(svn_fs_fs__revision_proplist(&proplist, fs, rev, iterpool));
-      SVN_ERR(svn_sqlite__bind_int64(stmt, 1, rev));
-      SVN_ERR(svn_sqlite__bind_properties(stmt, 2, proplist, pool));
-      SVN_ERR(svn_sqlite__insert(NULL, stmt));
-    }
-
-  /* Update the min-unpacked-revprop file to reflect our newly packed shard.
-   * (This doesn't update ffd->min_unpacked_revprop.) */
-  SVN_ERR(write_revnum_file(fs_path, PATH_MIN_UNPACKED_REVPROP,
-                            (svn_revnum_t)((shard + 1) * max_files_per_dir),
-                            iterpool));
-  svn_pool_destroy(iterpool);
-
-  /* Finally, remove the existing shard directory. */
-  SVN_ERR(svn_io_remove_dir2(shard_path, TRUE, cancel_func, cancel_baton,
-                             pool));
-
-  /* Notify caller we're starting to pack this shard. */
-  if (notify_func)
-    SVN_ERR(notify_func(notify_baton, shard, svn_fs_pack_notify_end_revprop,
-                        pool));
-
-  return SVN_NO_ERROR;
-}
-
 struct pack_baton
 {
   svn_fs_t *fs;
@@ -7932,12 +7712,12 @@ pack_body(void *baton,
   apr_int64_t i;
   svn_revnum_t youngest;
   apr_pool_t *iterpool;
-  const char *data_path, *revprops_path;
+  const char *data_path;
   svn_revnum_t min_unpacked_rev;
-  svn_revnum_t min_unpacked_revprop;
 
   SVN_ERR(read_format(&format, &max_files_per_dir, path_format(pb->fs, pool),
                       pool));
+  SVN_ERR(check_format(format));
 
   /* If the repository isn't a new enough format, we don't support packing.
      Return a friendly error to that effect. */
@@ -7954,27 +7734,14 @@ pack_body(void *baton,
                                 path_min_unpacked_rev(pb->fs, pool),
                                 pool));
 
-  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    {
-      SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
-                                    path_min_unpacked_revprop(pb->fs, pool),
-                                    pool));
-    }
-  else
-    {
-      min_unpacked_revprop = 0;
-    }
-
   SVN_ERR(get_youngest(&youngest, pb->fs->path, pool));
   completed_shards = (youngest + 1) / max_files_per_dir;
 
   /* See if we've already completed all possible shards thus far. */
-  if (min_unpacked_rev == (completed_shards * max_files_per_dir) &&
-      min_unpacked_revprop == (completed_shards * max_files_per_dir))
+  if (min_unpacked_rev == (completed_shards * max_files_per_dir))
     return SVN_NO_ERROR;
 
   data_path = svn_dirent_join(pb->fs->path, PATH_REVS_DIR, pool);
-  revprops_path = svn_dirent_join(pb->fs->path, PATH_REVPROPS_DIR, pool);
 
   iterpool = svn_pool_create(pool);
   for (i = min_unpacked_rev / max_files_per_dir; i < completed_shards; i++)
@@ -7989,21 +7756,6 @@ pack_body(void *baton,
                          pb->cancel_func, pb->cancel_baton, iterpool));
     }
 
-  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
-    for (i = min_unpacked_revprop / max_files_per_dir; i < completed_shards; i++)
-      {
-        svn_pool_clear(iterpool);
-
-        if (pb->cancel_func)
-          SVN_ERR(pb->cancel_func(pb->cancel_baton));
-
-        SVN_ERR(pack_revprop_shard(pb->fs,
-                                   revprops_path, pb->fs->path, i,
-                                   max_files_per_dir,
-                                   pb->notify_func, pb->notify_baton,
-                                   pb->cancel_func, pb->cancel_baton, iterpool));
-      }
-
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
@@ -8024,3 +7776,42 @@ svn_fs_fs__pack(svn_fs_t *fs,
   pb.cancel_baton = cancel_baton;
   return svn_fs_fs__with_write_lock(fs, pack_body, &pb, pool);
 }
+
+
+/** Verifying. **/
+
+/* Body of svn_fs_fs__verify().
+   Implements svn_fs_fs__walk_rep_reference().walker.  */
+static svn_error_t *
+verify_walker(representation_t *rep,
+              void *baton,
+              svn_fs_t *fs,
+              apr_pool_t *scratch_pool)
+{
+  struct rep_state *rs;
+  struct rep_args *rep_args;
+
+  /* ### Should this be using read_rep_line() directly? */
+  SVN_ERR(create_rep_state(&rs, &rep_args, rep, fs, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_fs_fs__verify(svn_fs_t *fs,
+                  svn_cancel_func_t cancel_func,
+                  void *cancel_baton,
+                  apr_pool_t *pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+
+  if (ffd->format < SVN_FS_FS__MIN_REP_SHARING_FORMAT)
+    return SVN_NO_ERROR;
+
+  /* Don't take any lock. */
+  SVN_ERR(svn_fs_fs__walk_rep_reference(fs, verify_walker, NULL,
+                                        cancel_func, cancel_baton,
+                                        pool));
+
+  return SVN_NO_ERROR;
+}

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/fs_fs.h Wed Jul 20 13:06:00 2011
@@ -38,6 +38,12 @@ svn_error_t *svn_fs_fs__open(svn_fs_t *f
 svn_error_t *svn_fs_fs__upgrade(svn_fs_t *fs,
                                 apr_pool_t *pool);
 
+/* Verify the fsfs filesystem FS.  Use POOL for temporary allocations. */
+svn_error_t *svn_fs_fs__verify(svn_fs_t *fs,
+                               svn_cancel_func_t cancel_func,
+                               void *cancel_baton,
+                               apr_pool_t *pool);
+
 /* Copy the fsfs filesystem at SRC_PATH into a new copy at DST_PATH.
    Use POOL for temporary allocations. */
 svn_error_t *svn_fs_fs__hotcopy(const char *src_path,

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/id.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/id.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/id.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/id.c Wed Jul 20 13:06:00 2011
@@ -337,7 +337,7 @@ serialize_id_private(svn_temp_serializer
   svn_temp_serializer__pop(context);
 }
 
-/* Serialize an ID within the serialization CONTECT.
+/* Serialize an ID within the serialization CONTEXT.
  */
 void
 svn_fs_fs__id_serialize(svn_temp_serializer__context_t *context,

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache-db.sql
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache-db.sql?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache-db.sql (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache-db.sql Wed Jul 20 13:06:00 2011
@@ -45,3 +45,10 @@ WHERE hash = ?1
 -- STMT_SET_REP
 INSERT OR FAIL INTO rep_cache (hash, revision, offset, size, expanded_size)
 VALUES (?1, ?2, ?3, ?4, ?5)
+
+
+-- STMT_GET_ALL_REPS
+SELECT hash, revision, offset, size, expanded_size
+FROM rep_cache
+
+

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.c?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.c Wed Jul 20 13:06:00 2011
@@ -20,6 +20,8 @@
  * ====================================================================
  */
 
+#include "svn_pools.h"
+
 #include "svn_private_config.h"
 
 #include "fs_fs.h"
@@ -39,6 +41,45 @@
 REP_CACHE_DB_SQL_DECLARE_STATEMENTS(statements);
 
 
+
+/** Helper functions. **/
+
+
+/* Check that REP refers to a revision that exists in FS. */
+static svn_error_t *
+rep_has_been_born(representation_t *rep,
+                  svn_fs_t *fs,
+                  apr_pool_t *pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  svn_revnum_t youngest;
+
+  SVN_ERR_ASSERT(rep);
+
+  youngest = ffd->youngest_rev_cache;
+  if (youngest < rep->revision)
+  {
+    /* Stale cache. */
+    SVN_ERR(svn_fs_fs__youngest_rev(&youngest, fs, pool));
+
+    /* Fresh cache. */
+    if (youngest < rep->revision)
+      return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
+                               _("Youngest revision is r%ld, but "
+                                 "rep-cache contains r%ld"),
+                               youngest, rep->revision);
+  }
+
+  return SVN_NO_ERROR;
+}
+
+
+
+/** Library-private API's. **/
+
+/* Body of svn_fs_fs__open_rep_cache().
+   Implements svn_atomic__init_once().init_func.
+ */
 static svn_error_t *
 open_rep_cache(void *baton,
                apr_pool_t *pool)
@@ -78,6 +119,77 @@ svn_fs_fs__open_rep_cache(svn_fs_t *fs,
   return svn_error_quick_wrap(err, _("Couldn't open rep-cache database"));
 }
 
+svn_error_t *
+svn_fs_fs__walk_rep_reference(svn_fs_t *fs,
+                              svn_error_t *(*walker)(representation_t *,
+                                                     void *,
+                                                     svn_fs_t *, 
+                                                     apr_pool_t *),
+                              void *walker_baton,
+                              svn_cancel_func_t cancel_func,
+                              void *cancel_baton,
+                              apr_pool_t *pool)
+{
+  fs_fs_data_t *ffd = fs->fsap_data;
+  svn_sqlite__stmt_t *stmt;
+  svn_boolean_t have_row;
+  int iterations = 0;
+
+  apr_pool_t *iterpool = svn_pool_create(pool);
+
+  /* Don't check ffd->rep_sharing_allowed. */
+  SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT);
+
+  if (! ffd->rep_cache_db)
+    SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool));
+
+  /* Get the statement. (There are no arguments to bind.) */
+  SVN_ERR(svn_sqlite__get_statement(&stmt, ffd->rep_cache_db,
+                                    STMT_GET_ALL_REPS));
+
+  /* Walk the cache entries. */
+  SVN_ERR(svn_sqlite__step(&have_row, stmt));
+  while (have_row)
+    {
+      representation_t *rep;
+      const char *sha1_digest;
+      
+      /* Clear ITERPOOL occasionally. */
+      if (iterations++ % 16 == 0)
+        svn_pool_clear(iterpool);
+
+      /* Check for cancellation. */
+      if (cancel_func)
+        SVN_ERR(cancel_func(cancel_baton));
+
+      /* Construct a representation_t. */
+      rep = apr_pcalloc(iterpool, sizeof(*rep));
+      sha1_digest = svn_sqlite__column_text(stmt, 0, iterpool);
+      SVN_ERR(svn_checksum_parse_hex(&rep->sha1_checksum,
+                                     svn_checksum_sha1, sha1_digest,
+                                     iterpool));
+      rep->revision = svn_sqlite__column_revnum(stmt, 1);
+      rep->offset = svn_sqlite__column_int64(stmt, 2);
+      rep->size = svn_sqlite__column_int64(stmt, 3);
+      rep->expanded_size = svn_sqlite__column_int64(stmt, 4);
+
+      /* Sanity check. */
+      if (rep)
+        SVN_ERR(rep_has_been_born(rep, fs, iterpool));
+
+      /* Walk. */
+      SVN_ERR(walker(rep, walker_baton, fs, iterpool));
+
+      SVN_ERR(svn_sqlite__step(&have_row, stmt));
+    }
+
+  SVN_ERR(svn_sqlite__reset(stmt));
+  svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
+
 /* This function's caller ignores most errors it returns.
    If you extend this function, check the callsite to see if you have
    to make it not-ignore additional error codes.  */
@@ -118,25 +230,8 @@ svn_fs_fs__get_rep_reference(representat
   else
     *rep = NULL;
 
-  /* Sanity check. */
   if (*rep)
-    {
-      svn_revnum_t youngest;
-
-      youngest = ffd->youngest_rev_cache;
-      if (youngest < (*rep)->revision)
-      {
-        /* Stale cache. */
-        SVN_ERR(svn_fs_fs__youngest_rev(&youngest, fs, pool));
-
-        /* Fresh cache. */
-        if (youngest < (*rep)->revision)
-          return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                                   _("Youngest revision is r%ld, but "
-                                     "rep-cache contains r%ld"),
-                                   youngest, (*rep)->revision);
-      }
-    }
+    SVN_ERR(rep_has_been_born(*rep, fs, pool));
 
   return svn_sqlite__reset(stmt);
 }

Modified: subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.h?rev=1148749&r1=1148748&r2=1148749&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_fs_fs/rep-cache.h Wed Jul 20 13:06:00 2011
@@ -40,6 +40,18 @@ svn_error_t *
 svn_fs_fs__open_rep_cache(svn_fs_t *fs,
                           apr_pool_t *pool);
 
+/* Iterate all representations currently in FS's cache. */
+svn_error_t *
+svn_fs_fs__walk_rep_reference(svn_fs_t *fs,
+                              svn_error_t *(*walker)(representation_t *rep,
+                                                     void *walker_baton,
+                                                     svn_fs_t *fs, 
+                                                     apr_pool_t *scratch_pool),
+                              void *walker_baton,
+                              svn_cancel_func_t cancel_func,
+                              void *cancel_baton,
+                              apr_pool_t *pool);
+
 /* Return the representation REP in FS which has fulltext CHECKSUM.
    REP is allocated in POOL.  If the rep cache database has not been
    opened, just set *REP to NULL. */



Mime
View raw message