You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2015/06/23 16:21:31 UTC
svn commit: r1687071 - /subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c
Author: kotkov
Date: Tue Jun 23 14:21:31 2015
New Revision: 1687071
URL: http://svn.apache.org/r1687071
Log:
Rework the initialization step in svn_fs_fs__hotcopy() in order to only
have a single call to hotcopy_create_empty_dest() and to emphasize how
an incremental hotcopy fallbacks to non-incremental mode if there is no
destination filesystem.
* subversion/libsvn_fs_fs/hotcopy.c
(svn_fs_fs__hotcopy): Check whether db/format exists in the destination
as the very first step of the incremental hotcopy. If it doesn't exist,
emphasize that we are performing a fallback to the non-incremental mode
by setting INCREMENTAL to FALSE. In the case of the fallback, passing
this value (FALSE) to lower levels, apart from being logical, allows us
to skip certain logic that's only required in a true incremental mode,
such as removing unnecessary non-packed revision files after replacing
them with a packed shard.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c?rev=1687071&r1=1687070&r2=1687071&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/hotcopy.c Tue Jun 23 14:21:31 2015
@@ -1078,20 +1078,20 @@ svn_fs_fs__hotcopy(svn_fs_t *src_fs,
SVN_ERR(svn_io_check_path(dst_format_abspath, &dst_format_kind, pool));
if (dst_format_kind == svn_node_none)
{
- /* Destination doesn't exist yet. Perform a normal hotcopy to a
- * empty destination using the same configuration as the source. */
- SVN_ERR(hotcopy_create_empty_dest(src_fs, dst_fs, dst_path, pool));
- }
- else
- {
- /* Check the existing repository. */
- SVN_ERR(svn_fs_fs__open(dst_fs, dst_path, pool));
- SVN_ERR(hotcopy_incremental_check_preconditions(src_fs, dst_fs,
- pool));
- hotcopy_setup_shared_fs_data(src_fs, dst_fs);
- SVN_ERR(svn_fs_fs__initialize_caches(dst_fs, pool));
+ /* No destination? Fallback to a non-incremental hotcopy. */
+ incremental = FALSE;
}
}
+
+ if (incremental)
+ {
+ /* Check the existing repository. */
+ SVN_ERR(svn_fs_fs__open(dst_fs, dst_path, pool));
+ SVN_ERR(hotcopy_incremental_check_preconditions(src_fs, dst_fs, pool));
+
+ hotcopy_setup_shared_fs_data(src_fs, dst_fs);
+ SVN_ERR(svn_fs_fs__initialize_caches(dst_fs, pool));
+ }
else
{
/* Start out with an empty destination using the same configuration