~ubuntu-branches/debian/experimental/subversion/experimental

« back to all changes in this revision

Viewing changes to subversion/libsvn_fs_fs/hotcopy.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2015-07-16 19:39:54 UTC
  • mfrom: (0.1.13)
  • Revision ID: package-import@ubuntu.com-20150716193954-6ueu2w62h4h556xh
Tags: 1.9.0~rc3-1
* New upstream pre-release.
* Point the Vcs-* URLs at the right directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
982
982
      if (kind == svn_node_file)
983
983
        {
984
984
          SVN_ERR(svn_sqlite__hotcopy(src_subdir, dst_subdir, pool));
 
985
 
 
986
          /* The source might have r/o flags set on it - which would be
 
987
             carried over to the copy. */
 
988
          SVN_ERR(svn_io_set_file_read_write(dst_subdir, FALSE, pool));
985
989
          SVN_ERR(svn_fs_fs__del_rep_reference(dst_fs, src_youngest, pool));
986
990
        }
987
991
    }
994
998
  return SVN_NO_ERROR;
995
999
}
996
1000
 
997
 
/* Wrapper around hotcopy_body taking out all necessary source repository
998
 
 * locks.
999
 
 */
1000
 
static svn_error_t *
1001
 
hotcopy_locking_src_body(void *baton, apr_pool_t *pool)
1002
 
{
1003
 
  struct hotcopy_body_baton *hbb = baton;
1004
 
  fs_fs_data_t *src_ffd = hbb->src_fs->fsap_data;
1005
 
 
1006
 
  return src_ffd->format >= SVN_FS_FS__MIN_PACK_LOCK_FORMAT
1007
 
    ? svn_error_trace(svn_fs_fs__with_pack_lock(hbb->src_fs, hotcopy_body,
1008
 
                                                baton, pool))
1009
 
    : hotcopy_body(baton, pool);
1010
 
}
1011
 
 
1012
1001
/* Create an empty filesystem at DST_FS at DST_PATH with the same
1013
1002
 * configuration as SRC_FS (uuid, format, and other parameters).
1014
1003
 * After creation DST_FS has no revisions, not even revision zero. */
1102
1091
  hbb.notify_baton = notify_baton;
1103
1092
  hbb.cancel_func = cancel_func;
1104
1093
  hbb.cancel_baton = cancel_baton;
1105
 
  SVN_ERR(svn_fs_fs__with_all_locks(dst_fs, hotcopy_locking_src_body, &hbb,
1106
 
                                    pool));
 
1094
  SVN_ERR(svn_fs_fs__with_all_locks(dst_fs, hotcopy_body, &hbb, pool));
1107
1095
 
1108
1096
  return SVN_NO_ERROR;
1109
1097
}