FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/hotcopy.c
/* Verify that DST_FS is a suitable destination for an incremental
 * hotcopy from SRC_FS. */
Verify that DST_FS is a suitable destination for an incremental
hotcopy from SRC_FS.
Verify that DST_FS is a suitable destination for an incremental hotcopy from SRC_FS .
static svn_error_t *
hotcopy_incremental_check_preconditions(svn_fs_t *src_fs,
                                        svn_fs_t *dst_fs,
                                        apr_pool_t *pool)
{
  fs_fs_data_t *src_ffd = src_fs->fsap_data;
  fs_fs_data_t *dst_ffd = dst_fs->fsap_data;
  if (src_ffd->format != dst_ffd->format)
    return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
      _("The FSFS format (%d) of the hotcopy source does not match the "
        "FSFS format (%d) of the hotcopy destination; please upgrade "
        "both repositories to the same format"),
      src_ffd->format, dst_ffd->format);
  if (strcmp(src_fs->uuid, dst_fs->uuid) != 0)
    return svn_error_create(SVN_ERR_RA_UUID_MISMATCH, NULL,
                            _("The UUID of the hotcopy source does "
                              "not match the UUID of the hotcopy "
                              "destination"));
  if (src_ffd->max_files_per_dir != dst_ffd->max_files_per_dir)
    return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
                            _("The sharding layout configuration "
                              "of the hotcopy source does not match "
                              "the sharding layout configuration of "
                              "the hotcopy destination"));
  return SVN_NO_ERROR;
}
static svn_error_t * hotcopy_incremental_check_preconditions ( svn_fs_t * src_fs , svn_fs_t * dst_fs , apr_pool_t * pool ) { fs_fs_data_t * src_ffd = src_fs -> fsap_data ; fs_fs_data_t * dst_ffd = dst_fs -> fsap_data ; if ( src_ffd -> format != dst_ffd -> format ) return svn_error_createf ( SVN_ERR_UNSUPPORTED_FEATURE , NULL , _ ( " " " " " " ) , src_ffd -> format , dst_ffd -> format ) ; if ( strcmp ( src_fs -> uuid , dst_fs -> uuid ) != 0 ) return svn_error_create ( SVN_ERR_RA_UUID_MISMATCH , NULL , _ ( " " " " " " ) ) ; if ( src_ffd -> max_files_per_dir != dst_ffd -> max_files_per_dir ) return svn_error_create ( SVN_ERR_UNSUPPORTED_FEATURE , NULL , _ ( " " " " " " " " ) ) ; return SVN_NO_ERROR ; }
Verify that DST_FS is a suitable destination for an incremental
 hotcopy from SRC_FS.
Verify that DST_FS is a suitable destination for an incremental hotcopy from SRC_FS .
/* We only support incremental hotcopy between the same format. */ /* Make sure the UUID of source and destination match up.
   * We don't want to copy over a different repository. */ /* Also require same shard size. */