Interface RevisionMatchedByCheckoutRulesCalculator


  • public interface RevisionMatchedByCheckoutRulesCalculator
    This is an optional interface which can be implemented by CollectChangesPolicy implementation. If implemented, then it's used when a build revision is computed.
    • Method Detail

      • getLatestRevisionAcceptedByCheckoutRules

        @NotNull
        RevisionMatchedByCheckoutRulesCalculator.Result getLatestRevisionAcceptedByCheckoutRules​(@NotNull
                                                                                                 VcsRoot root,
                                                                                                 @NotNull
                                                                                                 CheckoutRules rules,
                                                                                                 @NotNull
                                                                                                 String startRevision,
                                                                                                 @NotNull
                                                                                                 String startRevisionBranchName,
                                                                                                 @NotNull
                                                                                                 Collection<String> stopRevisions)
                                                                                          throws VcsException
        Should return the latest commit which affects files matched by checkout rules. Note: it is expected that checking for changes has been performed for this VCS root before the method call so all caches (local clones) already exist.
        Parameters:
        root - a VCS root where to search for a commit.
        rules - checkout rules
        startRevision - the revision from where to start search
        startRevisionBranchName - the name of the branch where the start revision belongs
        stopRevisions - revisions whose ancestors should be excluded from the computation
        Returns:
        the result object with the latest revision reachable from `startRevision` (inclusive) and accepted by the provided checkout rules
        Throws:
        VcsException
        Since:
        2023.03