コード例 #1
0
 public void CheckoutVersionFromRepository(Repository repository, ArchivedProjectVersion version, Purl directory)
 {
   _log.Info("Checking out: " + version + " into " + directory);
   Archive archive = ArchiveFactory.ReadZip(new Purl(repository.PathFor(version).AsString + ZipPackager.ZipExtension));
   ZipUnpackager unpackager = new ZipUnpackager(archive);
   unpackager.UnpackageZip(directory);
 }
コード例 #2
0
 public void CheckoutVersionFromRepository(Repository repository, ArchivedProjectVersion version, Purl directory)
 {
   _log.Info("Checking out: " + version + " into " + directory);
   FileSystemEntry entry = Infrastructure.FileSystemEntryRepository.FindEntry(repository.PathFor(version));
   FileSet fileSet = new FileSet();
   fileSet.AddAll(entry.BreadthFirstFiles);
   CopyFiles(fileSet, directory, true);
 }
コード例 #3
0
 public void CommitVersionToRepository(Repository repository, NewProjectVersion newProjectVersion)
 {
   _log.Info("Committing: " + newProjectVersion);
   using (Archive archive = MakeArchiveFor(newProjectVersion))
   {
     ZipPackager writer = new ZipPackager(archive);
     writer.WriteZip(new Purl(repository.PathFor(newProjectVersion).AsString + ZipPackager.ZipExtension));
   }
 }
コード例 #4
0
 public bool IsVersionPresentInRepository(Repository repository, ArchivedProjectVersion version)
 {
   return _fileSystem.IsFile(repository.PathFor(version).AsString + ZipPackager.ZipExtension);
 }
コード例 #5
0
 public bool IsVersionPresentInRepository(Repository repository, ArchivedProjectVersion version)
 {
   return _fileSystem.IsDirectory(repository.PathFor(version).AsString);
 }
コード例 #6
0
 public void CommitVersionToRepository(Repository repository, NewProjectVersion newProjectVersion)
 {
   _log.Info("Committing: " + newProjectVersion);
   Purl destiny = repository.PathFor(newProjectVersion);
   CopyFiles(newProjectVersion.FileSet, destiny, false);
 }