Package jetbrains.buildServer.vcs
Interface RepositoryStateChangesReporter
-
- All Superinterfaces:
CollectChangesPolicy,CollectRepositoryChangesPolicy,VcsExtension
public interface RepositoryStateChangesReporter extends CollectRepositoryChangesPolicy
Consumer-based changes collector. Reports all collected changed to the suppliedChangesConsumer
The most memory efficient way to implement changes collection policy- Since:
- 8.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcollectChanges(VcsRoot fromRepository, RepositoryStateData fromState, VcsRoot toRepository, RepositoryStateData toState, CheckoutRules checkoutRules, ChangesConsumer consumer)This method is called by the system to collect changes between two states.-
Methods inherited from interface jetbrains.buildServer.vcs.CollectRepositoryChangesPolicy
getCurrentState
-
-
-
-
Method Detail
-
collectChanges
void collectChanges(@Nullable VcsRoot fromRepository, @NotNull RepositoryStateData fromState, @NotNull VcsRoot toRepository, @NotNull RepositoryStateData toState, @NotNull CheckoutRules checkoutRules, @NotNull ChangesConsumer consumer) throws VcsExceptionThis method is called by the system to collect changes between two states. Each state is represented by a pair [VcsRoot,RepositoryStateData]. The from pair is formed by [fromRepository != null ? fromRepository : toRepository,fromState], the to pair is formed by [toRepository,toState].fromRepositoryis set tonulliff it is the same astoRepository.
Changes has to be collected for the range: from-excluding to to-including
fromRepositoryis mainly used to support collection of VCS change whenVcsRootproperties were changed (e.g. password, login). VCS Plugin implementation is intended to coves such cases. VCS Plugin should return no changes iffromRepositoryandtoRepositoryare unrelated
Following assumptions apply:fromRepositoryisnullif it is the same astoRepositoryfromRepositoryandtoRepositoryhas sameVcsRoot.getVcsName()- Method should return no changes if
fromRepositoryandtoRepositoryare unrelated fromStateshould contain at least one statetoStatecould be empty so VCS Plugin MUST computeCollectRepositoryChangesPolicy.getCurrentState(VcsRoot)implicitly- Returned changes should belong to
toRepository
- Parameters:
fromRepository- repository from which to collect changes (if not the same astoRepository)fromState- start point for collecting changes in fromRepository (excluding)toRepository- root to which changes should be collectedtoState- end point for collecting changes in toRepositorycheckoutRules- rulesconsumer- callback to submit collected changes. Exceptions should be re-thrown.- Throws:
VcsException- in the case of any errors- See Also:
ChangesConsumer
-
-