Interface RepositoryStateChangesReporter

    • 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 to null iff it is the same as toRepository.
        Changes has to be collected for the range: from-excluding to to-including
        fromRepository is mainly used to support collection of VCS change when VcsRoot properties were changed (e.g. password, login). VCS Plugin implementation is intended to coves such cases. VCS Plugin should return no changes if fromRepository and toRepository are unrelated
        Following assumptions apply:
        • fromRepository is null if it is the same as toRepository
        • fromRepository and toRepository has same VcsRoot.getVcsName()
        • Method should return no changes if fromRepository and toRepository are unrelated
        • fromState should contain at least one state
        • toState could be empty so VCS Plugin MUST compute CollectRepositoryChangesPolicy.getCurrentState(VcsRoot) implicitly
        • Returned changes should belong to toRepository
        Parameters:
        fromRepository - repository from which to collect changes (if not the same as toRepository)
        fromState - start point for collecting changes in fromRepository (excluding)
        toRepository - root to which changes should be collected
        toState - end point for collecting changes in toRepository
        checkoutRules - rules
        consumer - callback to submit collected changes. Exceptions should be re-thrown.
        Throws:
        VcsException - in the case of any errors
        See Also:
        ChangesConsumer