public class BitbucketServerWorkingCopyManager extends AbstractBitbucketServerExecutor implements NoContextVcsWorkingCopyManager, MergingVcsWorkingCopyManager, UpdatingVcsWorkingCopyManager, StatusProvidingVcsWorkingCopyManager, VcsExecutorWithRequirements
vcsRepositoryManager
Constructor and Description |
---|
BitbucketServerWorkingCopyManager() |
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.
|
bitbucketServerToGitData, bitbucketServerToReadOnlyGitData, getGitModuleDescriptor, stashServerRemoteEventsAreWorking
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
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
repositorypublic void stageChanges(@NotNull VcsWorkingCopy workingCopy, @NotNull VcsRepositoryData repositoryData, @NotNull Collection<String> pathsToAdd) throws RepositoryException
UpdatingVcsWorkingCopyManager
Staging logic may differ between repository types.
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
RepositoryException
@NotNull public VcsWorkingCopy updateRemote(@NotNull VcsWorkingCopy workingCopy, @NotNull VcsRepositoryData vcsRepositoryData, @NotNull String commitMessage) throws RepositoryException
UpdatingVcsWorkingCopyManager
updateRemote
in interface UpdatingVcsWorkingCopyManager
commitMessage
- - implementors are free to ignore this parameter.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
@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 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
@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 Set<Requirement> getRequirements(@NotNull VcsRepositoryData vcsRepositoryData)
getRequirements
in interface VcsExecutorWithRequirements
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.