FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/hotcopy.c
/* Shortcut for the revision and revprop copying for old (1 or 2) format
 * filesystems without sharding and packing.  Copy the non-sharded revision
 * and revprop files from SRC_FS to DST_FS.  Do not re-copy data which
 * already exists in DST_FS.  Do not somehow checkpoint the results in
 * the 'current' file in DST_FS.  Indicate progress via the optional
 * NOTIFY_FUNC callback using NOTIFY_BATON.  Use POOL for temporary
 * allocations.  Also see hotcopy_revisions().
 */
Shortcut for the revision and revprop copying for old (1 or 2) format
filesystems without sharding and packing.  Copy the non-sharded revision
and revprop files from SRC_FS to DST_FS.  Do not re-copy data which
already exists in DST_FS.  Do not somehow checkpoint the results in
the 'current' file in DST_FS.  Indicate progress via the optional
NOTIFY_FUNC callback using NOTIFY_BATON.  Use POOL for temporary
allocations.
Shortcut for the revision and revprop copying for old ( 1 or 2 ) format filesystems without sharding and packing . Copy the non - sharded revision and revprop files from SRC_FS to DST_FS . Do not re - copy data which already exists in DST_FS . Do not somehow checkpoint the results in the ' current ' file in DST_FS . Indicate progress via the optional NOTIFY_FUNC callback using NOTIFY_BATON . Use POOL for temporary allocations .
static svn_error_t *
hotcopy_revisions_old(svn_fs_t *src_fs,
                      svn_fs_t *dst_fs,
                      svn_revnum_t src_youngest,
                      const char *src_revs_dir,
                      const char *dst_revs_dir,
                      const char *src_revprops_dir,
                      const char *dst_revprops_dir,
                      svn_fs_hotcopy_notify_t notify_func,
                      void* notify_baton,
                      svn_cancel_func_t cancel_func,
                      void* cancel_baton,
                      apr_pool_t *pool)
{
  apr_pool_t *iterpool = svn_pool_create(pool);
  svn_revnum_t rev;
  for (rev = 0; rev <= src_youngest; rev++)
    {
      svn_boolean_t skipped = TRUE;
      svn_pool_clear(iterpool);
      if (cancel_func)
        SVN_ERR(cancel_func(cancel_baton));
      SVN_ERR(hotcopy_io_dir_file_copy(&skipped, src_revs_dir, dst_revs_dir,
                                       apr_psprintf(iterpool, "%ld", rev),
                                       iterpool));
      SVN_ERR(hotcopy_io_dir_file_copy(&skipped, src_revprops_dir,
                                       dst_revprops_dir,
                                       apr_psprintf(iterpool, "%ld", rev),
                                       iterpool));
      if (notify_func && !skipped)
        notify_func(notify_baton, rev, rev, iterpool);
    }
    svn_pool_destroy(iterpool);
    return SVN_NO_ERROR;
}
static svn_error_t * hotcopy_revisions_old ( svn_fs_t * src_fs , svn_fs_t * dst_fs , svn_revnum_t src_youngest , const char * src_revs_dir , const char * dst_revs_dir , const char * src_revprops_dir , const char * dst_revprops_dir , svn_fs_hotcopy_notify_t notify_func , void * notify_baton , svn_cancel_func_t cancel_func , void * cancel_baton , apr_pool_t * pool ) { apr_pool_t * iterpool = svn_pool_create ( pool ) ; svn_revnum_t rev ; for ( rev = 0 ; rev <= src_youngest ; rev ++ ) { svn_boolean_t skipped = TRUE ; svn_pool_clear ( iterpool ) ; if ( cancel_func ) SVN_ERR ( cancel_func ( cancel_baton ) ) ; SVN_ERR ( hotcopy_io_dir_file_copy ( & skipped , src_revs_dir , dst_revs_dir , apr_psprintf ( iterpool , " " , rev ) , iterpool ) ) ; SVN_ERR ( hotcopy_io_dir_file_copy ( & skipped , src_revprops_dir , dst_revprops_dir , apr_psprintf ( iterpool , " " , rev ) , iterpool ) ) ; if ( notify_func && ! skipped ) notify_func ( notify_baton , rev , rev , iterpool ) ; } svn_pool_destroy ( iterpool ) ; return SVN_NO_ERROR ; }
Shortcut for the revision and revprop copying for old (1 or 2) format
 filesystems without sharding and packing.
Shortcut for the revision and revprop copying for old ( 1 or 2 ) format filesystems without sharding and packing .