Class VcsSettingsTrackerImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.VcsSettingsTrackerImpl
-
- All Implemented Interfaces:
LVcsSettingsTracker,VcsSettingsTracker
public class VcsSettingsTrackerImpl extends Object implements VcsSettingsTracker
- Author:
- Pavel.Sher
-
-
Constructor Summary
Constructors Constructor Description VcsSettingsTrackerImpl(SQLRunnerEx sqlRunner, EventDispatcher<BuildServerListener> eventDispatcher, ExecutorServices executorServices, ProjectManager projectManager, VersionedSettingsManager versionedSettingsManager, VersionedSettingsConfigEventDispatcher versionedSettingsConfigEventDispatcher, ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforgetSettings(LVcsRootInstanceHolder buildType, LVcsRootInstance currentInstance)Forgets VCS settings for specified build type and vcs root.voidforgetSettingsRevisions(SBuildType buildType)Forgets all VCS settings revisions stored for the specified build typevoidforgetSettingsRevisions(SBuildType buildType, SVcsRoot parentRoot)Forgets VCS settings revisions for the specified build type and vcs root.RepositoryVersiongetFirstRevision(SBuildType buildType, VcsRootInstanceEntry vcsRootEntry)Returns the first detected revision for specified build configuration and root entry.StringgetFirstRevision(SBuildType buildType, VcsRootInstanceEntry entry, String vcsBranch)Returns first revision detected in branch for the given buildType, VCS root entry and the vcs branch or null if no revision is foundMap<String,String>getSettingsChangeRevisions(SBuildType buildType, VcsRootInstanceEntry entry)Returns branch revisions detected after settings changevoidsetFirstBranchRevisionTracker(FirstBranchRevisionTracker firstBranchRevisionTracker)VcsModificationOrdersettingsChanged(SBuildType buildType, VcsRootInstanceEntry rootEntry, String revision)Compares specified revision and revision of the first checking for changes made with the specified build configuration and VCS root instance.voidsetVcsHistory(VcsModificationHistory vcsHistory)voidupdateRevisions(LVcsRootInstance root, Map<? extends LVcsRootInstanceHolder,CheckoutRules> usages, boolean implicitSettingsRootUsages, RepositoryState fromState, RepositoryState toState, boolean force)Updates first detected revisions after collecting changes between fromState and toState in the specified VCS root attached with given checkout rules to specified buildTypes.
-
-
-
Constructor Detail
-
VcsSettingsTrackerImpl
public VcsSettingsTrackerImpl(@NotNull SQLRunnerEx sqlRunner, @NotNull EventDispatcher<BuildServerListener> eventDispatcher, @NotNull ExecutorServices executorServices, @NotNull ProjectManager projectManager, @NotNull VersionedSettingsManager versionedSettingsManager, @NotNull VersionedSettingsConfigEventDispatcher versionedSettingsConfigEventDispatcher, @NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
setVcsHistory
public void setVcsHistory(VcsModificationHistory vcsHistory)
-
setFirstBranchRevisionTracker
public void setFirstBranchRevisionTracker(FirstBranchRevisionTracker firstBranchRevisionTracker)
-
updateRevisions
public void updateRevisions(@NotNull LVcsRootInstance root, @NotNull Map<? extends LVcsRootInstanceHolder,CheckoutRules> usages, boolean implicitSettingsRootUsages, @NotNull RepositoryState fromState, @NotNull RepositoryState toState, boolean force)Description copied from interface:LVcsSettingsTrackerUpdates first detected revisions after collecting changes between fromState and toState in the specified VCS root attached with given checkout rules to specified buildTypes.- Specified by:
updateRevisionsin interfaceLVcsSettingsTracker
-
forgetSettings
public void forgetSettings(@NotNull LVcsRootInstanceHolder buildType, @NotNull LVcsRootInstance currentInstance)Description copied from interface:LVcsSettingsTrackerForgets VCS settings for specified build type and vcs root.- Specified by:
forgetSettingsin interfaceLVcsSettingsTracker- Parameters:
buildType- build type
-
getFirstRevision
@Nullable public String getFirstRevision(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry entry, @NotNull String vcsBranch)
Description copied from interface:VcsSettingsTrackerReturns first revision detected in branch for the given buildType, VCS root entry and the vcs branch or null if no revision is found- Specified by:
getFirstRevisionin interfaceVcsSettingsTracker- Parameters:
buildType- buildType of interestentry- root entry of interestvcsBranch- vcs branch name- Returns:
- see above
-
getSettingsChangeRevisions
@NotNull public Map<String,String> getSettingsChangeRevisions(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry entry)
Description copied from interface:VcsSettingsTrackerReturns branch revisions detected after settings change- Specified by:
getSettingsChangeRevisionsin interfaceVcsSettingsTracker
-
getFirstRevision
@Nullable public RepositoryVersion getFirstRevision(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry vcsRootEntry)
Description copied from interface:VcsSettingsTrackerReturns the first detected revision for specified build configuration and root entry. For DAG based VCS rootsVcsSettingsTracker.getFirstRevision(SBuildType, VcsRootInstanceEntry, String)should be used, however since we did not always store first/settings revisions per branch, this one can still be used as a fallback.- Specified by:
getFirstRevisionin interfaceVcsSettingsTracker- Returns:
-
forgetSettingsRevisions
public void forgetSettingsRevisions(@NotNull SBuildType buildType, @NotNull SVcsRoot parentRoot)Description copied from interface:VcsSettingsTrackerForgets VCS settings revisions for the specified build type and vcs root.- Specified by:
forgetSettingsRevisionsin interfaceVcsSettingsTracker- Parameters:
buildType- build type
-
forgetSettingsRevisions
public void forgetSettingsRevisions(@NotNull SBuildType buildType)Description copied from interface:VcsSettingsTrackerForgets all VCS settings revisions stored for the specified build type- Specified by:
forgetSettingsRevisionsin interfaceVcsSettingsTracker- Parameters:
buildType- build type
-
settingsChanged
@NotNull public VcsModificationOrder settingsChanged(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry rootEntry, @NotNull String revision)
Description copied from interface:VcsSettingsTrackerCompares specified revision and revision of the first checking for changes made with the specified build configuration and VCS root instance. This method works for linear VCS roots only. For DAG based VCS roots the result is always VcsModificationOrder.UNKNOWN.- If revision of the first checking for changes was made before the specified revision returns VcsModificationOrder.BEFORE.
- If revision of the first checking for changes was made after the specified revision, returns VcsModificationOrder.AFTER.
- If for some reason revisions cannot be compared returns VcsModificationOrder.UNKNOWN.
- Specified by:
settingsChangedin interfaceVcsSettingsTracker- Parameters:
buildType- build typerevision- revision to compare- Returns:
- see above
-
-