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 void
collectChanges(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 VcsException
This 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
].fromRepository
is set tonull
iff it is the same astoRepository
.
Changes has to be collected for the range: from-excluding to to-including
fromRepository
is mainly used to support collection of VCS change whenVcsRoot
properties were changed (e.g. password, login). VCS Plugin implementation is intended to coves such cases. VCS Plugin should return no changes iffromRepository
andtoRepository
are unrelated
Following assumptions apply:fromRepository
isnull
if it is the same astoRepository
fromRepository
andtoRepository
has sameVcsRoot.getVcsName()
- Method should return no changes if
fromRepository
andtoRepository
are unrelated fromState
should contain at least one statetoState
could 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
-
-