jetbrains.buildServer.vcs
Interface VcsModificationHistory


public interface VcsModificationHistory

Operates with stored modification entries.


Method Summary
 java.util.List<SFinishedBuild> filterBuildsWithChanges(java.util.List<SFinishedBuild> builds)
          Filters builds and returns only those builds that have at least one modification.
 SVcsModification findChangeById(long modificationId)
          Return modification by its id.
 java.util.List<SVcsModification> getAllModifications()
          Returns all VCS modifications.
 java.util.List<SVcsModification> getAllModifications(SBuildType buildType)
          Returns all stored modifications detected for the specified configuration.
 java.util.List<SVcsModification> getAllModifications(VcsRootInstance root)
          All configurations detected in the specified vcs root.
 UserSet<SUser> getCommitters(Build build, SelectPrevBuildPolicy selectPrevBuildPolicy)
          Deprecated. since 4.1, use SBuild.getCommitters(jetbrains.buildServer.vcs.SelectPrevBuildPolicy)
 java.util.List<FilteredVcsChange> getFilteredChanges(SVcsModification modification, SBuildType buildType, SBuild build)
          Returns filtered VCS changes for given VCS modification and build configuration.
 SVcsModification getLastModification(SBuildType buildType)
          Returns last modification detected for the specified build configuration
 SVcsModification getLastModification(VcsRootInstance vcsRoot)
          Return last modification detected in the given VcsRoot
 java.util.List<SVcsModification> getModificationsDetectedBetween(SBuildType buildType, java.lang.Long fromModificationId, java.lang.Long toModificationId)
          Load all modifications related to specified build configuration and having modification id between specified ids (i.e.
 java.util.List<SVcsModification> getModificationsInRange(VcsRootInstance root, java.lang.Long fromId, java.lang.Long toId)
          Returns the list of modifications for the specified root, between specified modification ids.
 java.util.List<SVcsModification> getModificationsSinceLastSuccessful(SBuildType buildType)
          Returns modifications related to specified build configuration detected since last successful build, returns empty list if there were no successful build.
 java.util.List<SVcsModification> getPendingModifications(SBuildType buildType)
          Returns pending modifications for the specified build configuration.
 

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
                                              VcsRootInstance 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

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

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: last 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: last 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,
                                                                         java.lang.Long fromModificationId,
                                                                         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: last 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.

getModificationsSinceLastSuccessful

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

getCommitters

UserSet<SUser> getCommitters(@NotNull
                             Build build,
                             @NotNull
                             SelectPrevBuildPolicy selectPrevBuildPolicy)
Deprecated. since 4.1, use SBuild.getCommitters(jetbrains.buildServer.vcs.SelectPrevBuildPolicy)

Returns all committers for the specified build instance, got using the specified calculating previous build policy.

Parameters:
build - specified build instance.
selectPrevBuildPolicy - specified build policy. Could be
SelectPrevBuildPolicy.SINCE_LAST_BUILD - get previous started build in the configuration.
SelectPrevBuildPolicy.SINCE_LAST_SUCCESSFULLY_FINISHED_BUILD - get previous successfully finished build in the configuration.
Returns:
committers for the specified build instance.

getAllModifications

java.util.List<SVcsModification> getAllModifications()
Returns all VCS modifications. Ordering: most recent modifications go first in the list

Returns:
see above