FreeBSD/contrib/subversion/subversion/libsvn_fs_x/hotcopy.c
/* Create an empty filesystem at DST_FS at DST_PATH with the same
 * configuration as SRC_FS (uuid, format, and other parameters).
 * After creation DST_FS has no revisions, not even revision zero. */
Create an empty filesystem at DST_FS at DST_PATH with the same
configuration as SRC_FS (uuid, format, and other parameters).
After creation DST_FS has no revisions, not even revision zero.
Create an empty filesystem at DST_FS at DST_PATH with the same configuration as SRC_FS ( uuid format and other parameters ) . After creation DST_FS has no revisions not even revision zero .
static svn_error_t *
hotcopy_create_empty_dest(svn_fs_t *src_fs,
                          svn_fs_t *dst_fs,
                          const char *dst_path,
                          apr_pool_t *scratch_pool)
{
  svn_fs_x__data_t *src_ffd = src_fs->fsap_data;
  SVN_ERR(svn_fs_x__create_file_tree(dst_fs, dst_path, src_ffd->format,
                                     src_ffd->max_files_per_dir,
                                     scratch_pool));
  SVN_ERR(svn_fs_x__set_uuid(dst_fs, src_fs->uuid, NULL, scratch_pool));
  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_rev(dst_fs, 0, scratch_pool),
                              scratch_pool));
  SVN_ERR(hotcopy_remove_file(svn_fs_x__path_revprops(dst_fs, 0,
                                                      scratch_pool),
                              scratch_pool));
  SVN_ERR(svn_fs_x__write_format(dst_fs, FALSE, scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * hotcopy_create_empty_dest ( svn_fs_t * src_fs , svn_fs_t * dst_fs , const char * dst_path , apr_pool_t * scratch_pool ) { svn_fs_x__data_t * src_ffd = src_fs -> fsap_data ; SVN_ERR ( svn_fs_x__create_file_tree ( dst_fs , dst_path , src_ffd -> format , src_ffd -> max_files_per_dir , scratch_pool ) ) ; SVN_ERR ( svn_fs_x__set_uuid ( dst_fs , src_fs -> uuid , NULL , scratch_pool ) ) ; SVN_ERR ( hotcopy_remove_file ( svn_fs_x__path_rev ( dst_fs , 0 , scratch_pool ) , scratch_pool ) ) ; SVN_ERR ( hotcopy_remove_file ( svn_fs_x__path_revprops ( dst_fs , 0 , scratch_pool ) , scratch_pool ) ) ; SVN_ERR ( svn_fs_x__write_format ( dst_fs , FALSE , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Create an empty filesystem at DST_FS at DST_PATH with the same
 configuration as SRC_FS (uuid, format, and other parameters).
Create an empty filesystem at DST_FS at DST_PATH with the same configuration as SRC_FS ( uuid format and other parameters ) .
/* Create the DST_FS repository with the same layout as SRC_FS. */ /* Copy the UUID.  Hotcopy destination receives a new instance ID, but
   * has the same filesystem UUID as the source. */ /* Remove revision 0 contents.  Otherwise, it may not get overwritten
   * due to having a newer timestamp. */ /* This filesystem is ready.  Stamp it with a format number.  Fail if
   * the 'format' file should already exist. */