private static void RunHotCopy(BackupArguments args, DirectoryInfo repo, string backupRevPath) { using (var hotCopy = new HotCopy()) { if (!string.IsNullOrEmpty(args.SubverisonPath)) hotCopy.ToolPath = args.SubverisonPath; hotCopy.BackupPath = backupRevPath; hotCopy.RepositoryPath = repo.FullName; hotCopy.Execute(); if (!string.IsNullOrEmpty(hotCopy.StandardError)) _log.Info(hotCopy.StandardError); } }
public void Execute() { string repositoryPath = TestHelper.TestRepository; string backupPath = Path.Combine(TestHelper.BackupPath, "Hotcopy.Test"); // remove existing if (Directory.Exists(backupPath)) PathHelper.DeleteDirectory(backupPath); Directory.CreateDirectory(backupPath); // make sure there is a repo TestHelper.CreateRepository(TestHelper.TestRepository, false); HotCopy hotcopy = new HotCopy(); hotcopy.RepositoryPath = repositoryPath; hotcopy.BackupPath = backupPath; bool result = hotcopy.Execute(); Assert.IsTrue(result); Assert.IsTrue(PathHelper.IsRepository(backupPath)); }