subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r903896 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Date Wed, 27 Jan 2010 22:58:11 GMT
Author: danielsh
Date: Wed Jan 27 22:58:11 2010
New Revision: 903896

URL: http://svn.apache.org/viewvc?rev=903896&view=rev
Log:
Fix packing of format-4 FSFS repositories.

* subversion/libsvn_fs_fs/fs_fs.c
  (pack_body):
    Don't try to pack revprops unless the format allows that.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=903896&r1=903895&r2=903896&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Wed Jan 27 22:58:11 2010
@@ -7511,11 +7511,18 @@
                                                 PATH_MIN_UNPACKED_REV, pool),
                                 pool));
 
-   SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
-                                 svn_dirent_join(pb->fs->path,
-                                                 PATH_MIN_UNPACKED_REVPROP,
-                                                 pool),
-                                 pool));
+  if (format >= SVN_FS_FS__MIN_PACKED_REVPROP_FORMAT)
+    {
+      SVN_ERR(read_min_unpacked_rev(&min_unpacked_revprop,
+                                    svn_dirent_join(pb->fs->path,
+                                                    PATH_MIN_UNPACKED_REVPROP,
+                                                    pool),
+                                    pool));
+    }
+  else
+    {
+      min_unpacked_revprop = 0;
+    }
 
   SVN_ERR(get_youngest(&youngest, pb->fs->path, pool));
   completed_shards = (youngest + 1) / max_files_per_dir;
@@ -7541,19 +7548,20 @@
                          pb->cancel_func, pb->cancel_baton, iterpool));
     }
 
-  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));
-    }
+  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;



Mime
View raw message