public class MercurialWorkingCopyManager extends AbstractMercurialExecutor implements MergingVcsWorkingCopyManager, UpdatingVcsWorkingCopyManager, VcsExecutorWithRequirements, NoContextVcsWorkingCopyManager, StatusProvidingVcsWorkingCopyManager
buildDirectoryManager, buildLoggerManager, capabilityContext, credentialsAccessor, customVariableContext, i18nResolver, scopedExclusionService, sshProxyService, trustedKeyHelper
Constructor and Description |
---|
MercurialWorkingCopyManager() |
Modifier and Type | Method and Description |
---|---|
VcsWorkingCopy |
checkoutAndMerge(CommonContext commonContext,
VcsRepositoryData vcsRepositoryData,
VcsBranch targetBranch,
PlanVcsRevisionData revisionOnTarget,
VcsBranch sourceBranch,
PlanVcsRevisionData sourceRevision,
File targetPath)
Checks out the targetBranch and merges sourceBranch to it.
|
VcsWorkingCopy |
commitLocal(VcsWorkingCopy workingCopy,
VcsRepositoryData vcsRepositoryData,
String commitMessage)
Create a local commit.
|
Set<Requirement> |
getRequirements(VcsRepositoryData vcsRepositoryData) |
VcsWorkingCopy |
getWorkingCopyInfo(VcsRepositoryData repositoryData,
File checkoutPath)
Provide repository working copy information for the given checkout path.
|
VcsWorkingCopy |
retrieveSourceCode(CommonContext commonContext,
VcsRepositoryData repositoryData,
PlanVcsRevisionData targetRevision,
File targetPath)
Checkout or update a working copy to a revision.
|
void |
stageChanges(VcsWorkingCopy workingCopy,
VcsRepositoryData repositoryData,
Collection<String> pathsToAdd)
Stage changes for committing.
|
VcsWorkingCopy |
updateRemote(VcsWorkingCopy workingCopy,
VcsRepositoryData vcsRepositoryData,
String commitMessage)
Update remote repository.
|
VcsWorkingCopy |
updateToLatestRevision(CommonContext commonContext,
VcsRepositoryData repositoryData,
File targetPath)
Checkout or update a working copy to the latest revision.
|
VcsWorkingCopy |
updateToLatestRevision(VcsRepositoryData repositoryData,
File targetPath)
Checkout or update a working copy to the latest revision.
|
getAccessData, getCacheBaseDirectory, getCacheDirectory, getCacheDirectory, getHgRepoAccess, getHgRepoAccess, getMaxCommitsToReturn, getOpenBranches, getSubstitutedAccessData, getWorkingDirectory, substituteString, updateRemoteWithNewBranch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDoMerge, getMergingRequirements
@NotNull public VcsWorkingCopy getWorkingCopyInfo(@NotNull VcsRepositoryData repositoryData, @NotNull File checkoutPath) throws RepositoryException
StatusProvidingVcsWorkingCopyManager
getWorkingCopyInfo
in interface StatusProvidingVcsWorkingCopyManager
getWorkingCopyInfo
in class AbstractMercurialExecutor
repositoryData
- configuration of the repositorycheckoutPath
- path, where repository was checked outRepositoryException
- if any error occurs, or e.g. the path is not a valid checkout path for the
repository@NotNull public Set<Requirement> getRequirements(@NotNull VcsRepositoryData vcsRepositoryData)
getRequirements
in interface VcsExecutorWithRequirements
@NotNull public VcsWorkingCopy updateToLatestRevision(@NotNull VcsRepositoryData repositoryData, @NotNull File targetPath) throws RepositoryException
NoContextVcsWorkingCopyManager
updateToLatestRevision
in interface NoContextVcsWorkingCopyManager
repositoryData
- - configuration of a repository to checkout/updatetargetPath
- - workings copy's path. Note that some legacy implementation may ignore this parameter. (see FixedDirectoryWorkingCopyManager
)RepositoryException
@NotNull public VcsWorkingCopy updateToLatestRevision(@NotNull CommonContext commonContext, @NotNull VcsRepositoryData repositoryData, @NotNull File targetPath) throws RepositoryException
VcsWorkingCopyManager
updateToLatestRevision
in interface VcsWorkingCopyManager
commonContext
- - a current build or deployment contextrepositoryData
- - configuration of a repository to checkout/updatetargetPath
- - workings copy's path. Note that some legacy implementation may ignore this parameter. (see FixedDirectoryWorkingCopyManager
)RepositoryException
@NotNull public VcsWorkingCopy retrieveSourceCode(@NotNull CommonContext commonContext, @NotNull VcsRepositoryData repositoryData, @NotNull PlanVcsRevisionData targetRevision, @NotNull File targetPath) throws RepositoryException
VcsWorkingCopyManager
retrieveSourceCode
in interface VcsWorkingCopyManager
commonContext
- - a current build or deployment contextrepositoryData
- - configuration of a repository to checkout/updatetargetRevision
- - revision to check out or update totargetPath
- - workings copy's path. Note that some legacy implementation may ignore this parameter. (see FixedDirectoryWorkingCopyManager
)RepositoryException
public void stageChanges(@NotNull VcsWorkingCopy workingCopy, @NotNull VcsRepositoryData repositoryData, @NotNull Collection<String> pathsToAdd) throws RepositoryException
UpdatingVcsWorkingCopyManager
Staging logic may differ between repository types. As an example, in Git it is necessary to stage added, modified and removed files before committing. In Mercurial on the other hand, only added and removed files need to be staged (modified files will be committed regardless, as they are considered tracked by the VCS).
stageChanges
in interface UpdatingVcsWorkingCopyManager
workingCopy
- workspace to perform the stagingrepositoryData
- configuration of repositorypathsToAdd
- paths, relative to working copy directory, to stage for committing; if empty, all modified
files from working copy directory should be stagedRepositoryException
@NotNull public VcsWorkingCopy commitLocal(@NotNull VcsWorkingCopy workingCopy, @NotNull VcsRepositoryData vcsRepositoryData, @NotNull String commitMessage) throws RepositoryException
UpdatingVcsWorkingCopyManager
commitLocal
in interface UpdatingVcsWorkingCopyManager
commitLocal
in class AbstractMercurialExecutor
RepositoryException
@NotNull public VcsWorkingCopy updateRemote(@NotNull VcsWorkingCopy workingCopy, @NotNull VcsRepositoryData vcsRepositoryData, @NotNull String commitMessage) throws RepositoryException
UpdatingVcsWorkingCopyManager
updateRemote
in interface UpdatingVcsWorkingCopyManager
updateRemote
in class AbstractMercurialExecutor
commitMessage
- - implementors are free to ignore this parameter.RepositoryException
@NotNull public VcsWorkingCopy checkoutAndMerge(@NotNull CommonContext commonContext, @NotNull VcsRepositoryData vcsRepositoryData, @NotNull VcsBranch targetBranch, @NotNull PlanVcsRevisionData revisionOnTarget, @NotNull VcsBranch sourceBranch, @NotNull PlanVcsRevisionData sourceRevision, @NotNull File targetPath) throws RepositoryException
MergingVcsWorkingCopyManager
checkoutAndMerge
in interface MergingVcsWorkingCopyManager
vcsRepositoryData
- configuration of the repository. Note that the following parameters override branch stored in repository data.targetBranch
- - target branch (branch to checkout and merge to)revisionOnTarget
- - revision to checkout and merge tosourceBranch
- - branch to merge fromsourceRevision
- - revision to merge fromtargetPath
- - workings copy's pathRepositoryException
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.