You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/12/15 17:25:00 UTC

svn commit: r1214840 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

Author: stsp
Date: Thu Dec 15 16:24:59 2011
New Revision: 1214840

URL: http://svn.apache.org/viewvc?rev=1214840&view=rev
Log:
Another bug fix in incremental FSFS hotcopy when copying packs.

* subversion/libsvn_fs_fs/fs_fs.c
  (hotcopy_body): Remove empty revision directories after all files inside
   them have been moved into a pack.

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=1214840&r1=1214839&r2=1214840&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu Dec 15 16:24:59 2011
@@ -8226,6 +8226,8 @@ hotcopy_body(void *baton, apr_pool_t *po
   /* First, copy packed shards. */
   for (rev = 0; rev < src_min_unpacked_rev; rev += max_files_per_dir)
     {
+      svn_error_t *err;
+
       svn_pool_clear(iterpool);
 
       if (cancel_func)
@@ -8247,6 +8249,18 @@ hotcopy_body(void *baton, apr_pool_t *po
       if (incremental)
         SVN_ERR(hotcopy_remove_rev_files(dst_fs, rev, rev + max_files_per_dir,
                                          max_files_per_dir, iterpool));
+
+      /* Now that all revisions have moved into the pack, the original
+       * rev dir can be removed. */
+      err = svn_io_remove_dir2(path_rev_shard(dst_fs, rev, iterpool),
+                               TRUE, cancel_func, cancel_baton, iterpool);
+      if (err)
+        {
+          if (APR_STATUS_IS_ENOTEMPTY(err->apr_err))
+            svn_error_clear(err);
+          else
+            return svn_error_trace(err);
+        }
     }
 
   if (cancel_func)