Interface VcsModificationHistory


  • public interface VcsModificationHistory
    Operates with stored modification entries.
    • Method Detail

      • findChangeById

        @Nullable
        SVcsModification findChangeById​(long modificationId)
        Return modification by its id.
        Parameters:
        modificationId - VCS modification id
        Returns:
        single modification information
        See Also:
        SVcsModification
      • getLastModification

        @Nullable
        SVcsModification getLastModification​(@NotNull
                                             LVcsRootInstance vcsRoot)
        Return last modification detected in the given VcsRoot
        Parameters:
        vcsRoot - VCS root
        Returns:
        last modification detected in the given VcsRoot
        See Also:
        SVcsModification, VcsRoot
      • getLastModificationUpTo

        @Nullable
        SVcsModification getLastModificationUpTo​(@NotNull
                                                 VcsRootInstance root,
                                                 @NotNull
                                                 java.lang.Long upperBoundModificationId)
        Returns last modification detected in the given VCS root with id less than or equals to the given upper bound
        Parameters:
        root - VCS root of interest
        upperBoundModificationId - upper bound modification id
        Returns:
        see above
      • getLastModification

        @Nullable
        SVcsModification getLastModification​(@NotNull
                                             SBuildType buildType)
        Returns last modification detected for the specified build configuration
        Parameters:
        buildType - build configuration
        Returns:
        last modification detected
      • getFilteredChanges

        java.util.List<FilteredVcsChange> getFilteredChanges​(@NotNull
                                                             SVcsModification modification,
                                                             @NotNull
                                                             SBuildType buildType,
                                                             @Nullable
                                                             SBuild build)
        Returns filtered VCS changes for given VCS modification and build configuration. Filtered VCS change is a changed file with information whether it was included or excluded by checkout rules of build configuration. Method should not be called for personal modifications.
        Parameters:
        modification - VCS modification
        buildType - build configuration
        build - where this modification occurred or null if there is no such build yet
        Returns:
        filtered changes
      • getPendingModifications

        @Deprecated
        java.util.List<SVcsModification> getPendingModifications​(@NotNull
                                                                 SBuildType buildType)
        Returns pending modifications for the specified build configuration. Pending modifications are those that are not included in any build yet.
        Parameters:
        buildType - build configuration
        Returns:
        see above
      • getAllModifications

        java.util.List<SVcsModification> getAllModifications​(@NotNull
                                                             SBuildType buildType)
        Returns all stored modifications detected for the specified configuration. Ordering: most recent modifications go first in the list
        Parameters:
        buildType - specified build configuration.
        Returns:
        all stored modifications detected for the specified configuration.
      • getAllModifications

        java.util.List<SVcsModification> getAllModifications​(@NotNull
                                                             VcsRootInstance root)
        All configurations detected in the specified vcs root. Ordering: most recent modifications go first in the list
        Parameters:
        root - specified vcs root.
        Returns:
        all configurations detected in the specified vcs root.
      • getModificationsInRange

        @NotNull
        java.util.List<SVcsModification> getModificationsInRange​(@Nullable
                                                                 VcsRootInstance root,
                                                                 @Nullable
                                                                 java.lang.Long fromId,
                                                                 @Nullable
                                                                 java.lang.Long toId)
        Returns the list of modifications for the specified root, between specified modification ids. Any of parameters can be null, which means it is not set.
        Parameters:
        root - the VCS root (if null the result will include modifications from all roots)
        fromId - will search for modifications with id > fromId
        toId - - will search for modifications with id <= toId
        Returns:
        the list of detected modifications in the specified range
      • filterBuildsWithChanges

        java.util.List<SFinishedBuild> filterBuildsWithChanges​(@NotNull
                                                               java.util.List<SFinishedBuild> builds)
        Filters builds and returns only those builds that have at least one modification. All builds must correspond to the same project.
        Parameters:
        builds - builds to filter, must be sorted in reverse order, i.e. most recent build first
        Returns:
        builds containing at least one modification
      • getModificationsDetectedBetween

        @NotNull
        java.util.List<SVcsModification> getModificationsDetectedBetween​(@NotNull
                                                                         SBuildType buildType,
                                                                         @Nullable
                                                                         java.lang.Long fromModificationId,
                                                                         @Nullable
                                                                         java.lang.Long toModificationId)
        Load all modifications related to specified build configuration and having modification id between specified ids (i.e. returns modifications detected since modification with id fromModificationId till modification with id toModificationId (inclusive)). Specify null for fromModificationId or toModificationId to open the border. Ordering: most recent modifications go first in the list
        Parameters:
        buildType - specified build configuration.
        fromModificationId - - will search for modifications with id > fromModificationId
        toModificationId - - will search for modifications with id <= toModificationId
        Returns:
        all modifications between fromModificationId and toModificationId.
      • getFixedModificationsCount

        @NotNull
        java.util.List<SVcsModification> getFixedModificationsCount​(@NotNull
                                                                    SBuildType buildType,
                                                                    @Nullable
                                                                    java.lang.Long maxModificationId,
                                                                    int count)
        Returns a number of VCS modifications related to the specified build configuration and having modification id <= maxModificationId Ordering: most recent modifications go first in the list resulting list can contain less than required count modifications if the configuration doesn't have the requested amount of modifications
        Parameters:
        buildType - - specified build configuration.
        maxModificationId - - will search for modifications with id <= maxModificationId
        count - - count of modifications to return
        Returns:
        list of modifications with id <=maxModificationId from newest to oldest and not more than the specified count
        Since:
        2020.1
      • getModificationsSinceLastSuccessful

        @NotNull
        java.util.List<SVcsModification> getModificationsSinceLastSuccessful​(@NotNull
                                                                             SBuildType buildType)
        Returns modifications related to specified build configuration detected since last successful build, returns empty list if there were no successful build.
        Parameters:
        buildType - build configuration
        Returns:
        see above
      • getAllModifications

        @NotNull
        java.util.List<SVcsModification> getAllModifications()
        Returns all VCS modifications. Ordering: most recent modifications go first in the list
        Returns:
        see above
      • getAllModificationsDetectedSince

        @NotNull
        java.util.List<SVcsModification> getAllModificationsDetectedSince​(@NotNull
                                                                          java.util.Date sinceDate)
        Parameters:
        sinceDate - date when modification was detected by the server (not the date when it was made in repository).
        Returns:
        all modifications detected since specified date.
      • getModificationsOrder

        @NotNull
        VcsModificationOrder getModificationsOrder​(@NotNull
                                                   VcsRootInstance root,
                                                   @NotNull
                                                   java.lang.String version1,
                                                   @NotNull
                                                   java.lang.String version2)
        Get the order relationship between modifications with specified versions in given VCS root
        Parameters:
        root - VCS root of interest
        version1 - version of the first modification
        version2 - version of the second modification
        Returns:
        VcsModificationOrder.BEFORE if modification with version1 happened before modification with version2; VcsModificationOrder.EQUALS if version1 equals version2; VcsModificationOrder.AFTER if modification with version1 happened after modification with version2; VcsModificationOrder.UNKNOWN if the order of modifications cannot be established.
        Since:
        7.0