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 void
forgetSettings(LVcsRootInstanceHolder buildType, LVcsRootInstance currentInstance)
Forgets VCS settings for specified build type and vcs root.void
forgetSettingsRevisions(SBuildType buildType)
Forgets all VCS settings revisions stored for the specified build typevoid
forgetSettingsRevisions(SBuildType buildType, SVcsRoot parentRoot)
Forgets VCS settings revisions for the specified build type and vcs root.RepositoryVersion
getFirstRevision(SBuildType buildType, VcsRootInstanceEntry vcsRootEntry)
Returns the first detected revision for specified build configuration and root entry.String
getFirstRevision(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 changevoid
setFirstBranchRevisionTracker(FirstBranchRevisionTracker firstBranchRevisionTracker)
VcsModificationOrder
settingsChanged(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.void
setVcsHistory(VcsModificationHistory vcsHistory)
void
updateRevisions(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:LVcsSettingsTracker
Updates 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:
updateRevisions
in interfaceLVcsSettingsTracker
-
forgetSettings
public void forgetSettings(@NotNull LVcsRootInstanceHolder buildType, @NotNull LVcsRootInstance currentInstance)
Description copied from interface:LVcsSettingsTracker
Forgets VCS settings for specified build type and vcs root.- Specified by:
forgetSettings
in interfaceLVcsSettingsTracker
- Parameters:
buildType
- build type
-
getFirstRevision
@Nullable public String getFirstRevision(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry entry, @NotNull String vcsBranch)
Description copied from interface:VcsSettingsTracker
Returns 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:
getFirstRevision
in 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:VcsSettingsTracker
Returns branch revisions detected after settings change- Specified by:
getSettingsChangeRevisions
in interfaceVcsSettingsTracker
-
getFirstRevision
@Nullable public RepositoryVersion getFirstRevision(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry vcsRootEntry)
Description copied from interface:VcsSettingsTracker
Returns 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:
getFirstRevision
in interfaceVcsSettingsTracker
- Returns:
-
forgetSettingsRevisions
public void forgetSettingsRevisions(@NotNull SBuildType buildType, @NotNull SVcsRoot parentRoot)
Description copied from interface:VcsSettingsTracker
Forgets VCS settings revisions for the specified build type and vcs root.- Specified by:
forgetSettingsRevisions
in interfaceVcsSettingsTracker
- Parameters:
buildType
- build type
-
forgetSettingsRevisions
public void forgetSettingsRevisions(@NotNull SBuildType buildType)
Description copied from interface:VcsSettingsTracker
Forgets all VCS settings revisions stored for the specified build type- Specified by:
forgetSettingsRevisions
in interfaceVcsSettingsTracker
- Parameters:
buildType
- build type
-
settingsChanged
@NotNull public VcsModificationOrder settingsChanged(@NotNull SBuildType buildType, @NotNull VcsRootInstanceEntry rootEntry, @NotNull String revision)
Description copied from interface:VcsSettingsTracker
Compares 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:
settingsChanged
in interfaceVcsSettingsTracker
- Parameters:
buildType
- build typerevision
- revision to compare- Returns:
- see above
-
-