public class GitChangeDetector extends AbstractGitExecutor implements VcsChangeDetector
buildDirectoryManager, customVariableContext, DEFAULT_BRANCH, i18nResolver, sshProxyService, trustedKeyHelper
Constructor and Description |
---|
GitChangeDetector() |
Modifier and Type | Method and Description |
---|---|
BuildRepositoryChanges |
collectChangesForRevision(PlanKey planKey,
VcsRepositoryData repositoryData,
String customRevision) |
BuildRepositoryChanges |
collectChangesSinceRevision(PlanKey planKey,
VcsRepositoryData repositoryData,
PlanVcsRevisionData lastRevisionData) |
static CommitContext |
createUnknownChangesEntry(com.atlassian.sal.api.message.I18nResolver i18nResolver,
String startRevision,
String endRevision) |
static String |
determineStartOfRevisionRange(GitOperationHelper helper,
File cacheDirectory,
String preferredRevision,
String fallbackRevision) |
static void |
ensureRevisionExists(GitOperationHelper helper,
File cacheDirectory,
String hashOrRefToFetch,
String targetRevision) |
ContextualVcsId |
getVcsIdForExecutor(VcsRepositoryData vcsRepositoryData)
Returned id has to fulfill the following:
Given two VcsRepositoryData objects A and B, and executor e returning equal ContextualVcsId (in terms of equals()),
for any operation foo() provided by the executor,
the calls e::foo(A) and e::foo(B) should be equivalent.
|
void |
setBuildLoggerManager(BuildLoggerManager buildLoggerManager) |
getAccessData, getCacheDirectory, getCachePath, getGitCapability, getSharedCredentialsIdField, getSshCapability, getSubstitutedAccessData, getSubstitutedAccessDataBuilder, getWorkingDirectory, isUsingSharedCredentials, rethrowOrRemoveDirectory, setBuildDirectoryManager, setCapabilityContext, setCredentialsAccessor, setCustomVariableContext, setI18nResolver, setSshProxyService, setTrustedKeyHelper, substituteString
@NotNull public BuildRepositoryChanges collectChangesSinceRevision(@NotNull PlanKey planKey, @NotNull VcsRepositoryData repositoryData, @NotNull PlanVcsRevisionData lastRevisionData) throws RepositoryException
collectChangesSinceRevision
in interface VcsChangeDetector
RepositoryException
@NotNull public BuildRepositoryChanges collectChangesForRevision(@NotNull PlanKey planKey, @NotNull VcsRepositoryData repositoryData, @NotNull String customRevision) throws RepositoryException
collectChangesForRevision
in interface VcsChangeDetector
RepositoryException
public static void ensureRevisionExists(GitOperationHelper helper, File cacheDirectory, String hashOrRefToFetch, String targetRevision) throws RepositoryException
RepositoryException
public static String determineStartOfRevisionRange(GitOperationHelper helper, File cacheDirectory, @Nullable String preferredRevision, String fallbackRevision)
public static CommitContext createUnknownChangesEntry(com.atlassian.sal.api.message.I18nResolver i18nResolver, @Nullable String startRevision, String endRevision)
@Nullable public ContextualVcsId getVcsIdForExecutor(@NotNull VcsRepositoryData vcsRepositoryData)
IdentifyingExecutor
VcsBranchDetector
. If they also point
to the same branch, they are considered equal in context of VcsChangeDetector
getVcsIdForExecutor
in interface IdentifyingExecutor
public void setBuildLoggerManager(BuildLoggerManager buildLoggerManager)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.