Search in sources :

Example 1 with PipelineRevisionRange

use of com.thoughtworks.go.server.web.PipelineRevisionRange in project gocd by gocd.

the class ChangesetService method revisionsBetween.

public List<MaterialRevision> revisionsBetween(List<PipelineRevisionRange> pipelineRevisionRanges, Username username, HttpLocalizedOperationResult result) {
    ArrayList<MaterialRevision> revisions = new ArrayList<>();
    for (PipelineRevisionRange pipelineRevisionRange : pipelineRevisionRanges) {
        DependencyMaterialRevision fromDmr = DependencyMaterialRevision.create(pipelineRevisionRange.getFromRevision(), null);
        DependencyMaterialRevision toDmr = DependencyMaterialRevision.create(pipelineRevisionRange.getToRevision(), null);
        revisions.addAll(revisionsBetween(pipelineRevisionRange.getPipelineName(), fromDmr.getPipelineCounter(), toDmr.getPipelineCounter(), username, result, true, false));
    }
    return deduplicateMaterialRevisionsForCommonMaterials(revisions);
}
Also used : PipelineRevisionRange(com.thoughtworks.go.server.web.PipelineRevisionRange) ArrayList(java.util.ArrayList) DependencyMaterialRevision(com.thoughtworks.go.domain.materials.dependency.DependencyMaterialRevision) MaterialRevision(com.thoughtworks.go.domain.MaterialRevision) DependencyMaterialRevision(com.thoughtworks.go.domain.materials.dependency.DependencyMaterialRevision)

Aggregations

MaterialRevision (com.thoughtworks.go.domain.MaterialRevision)1 DependencyMaterialRevision (com.thoughtworks.go.domain.materials.dependency.DependencyMaterialRevision)1 PipelineRevisionRange (com.thoughtworks.go.server.web.PipelineRevisionRange)1 ArrayList (java.util.ArrayList)1