com.atlassian.bamboo.repository
Interface BranchMergingAwareRepository

All Superinterfaces:
BambooPluginModule, BranchAwareRepository, BuildConfigurationAwarePlugin, ConfigurablePlugin, ConvertibleFromConfig, CustomSourceDirectoryAwareRepository, DescriptionProvider, InitablePluginModule, NameProvider, RenderableBuildConfiguration, Repository, RepositoryV2, java.io.Serializable
All Known Implementing Classes:
BitbucketRepository, HgRepository

public interface BranchMergingAwareRepository
extends BranchAwareRepository, CustomSourceDirectoryAwareRepository


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.repository.Repository
SELECTED_REPOSITORY, UNKNOWN_HOST
 
Method Summary
 java.lang.String getBranchIntegrationEditHtml()
          Gives repository a chance to display a HTML on the UI when user is enabling "Branch Integration" feature
 boolean isMergingSupported()
           
 boolean mergeWorkspaceWith(BuildContext buildContext, java.io.File checkoutDirectory, java.lang.String targetRevision)
          Merges a workspace located in checkout directory with the target revision.
 java.lang.String retrieveSourceCode(BuildContext buildContext, java.lang.String vcsRevisionKey, java.io.File sourceDirectory, int depth)
          Checks out the latest source code from an appropriate repository to specified directory
 
Methods inherited from interface com.atlassian.bamboo.repository.BranchAwareRepository
getVcsBranch, setVcsBranch
 
Methods inherited from interface com.atlassian.bamboo.repository.Repository
checkConnection, getHost, getKey, getLocationIdentifier, getMinimalEditHtml, getName, getShortKey
 
Methods inherited from interface com.atlassian.bamboo.fieldvalue.ConvertibleFromConfig
populateFromConfig, toConfiguration
 
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.RepositoryV2
collectChangesSinceLastBuild, getSourceCodeDirectory, isRepositoryDifferent
 
Methods inherited from interface com.atlassian.bamboo.v2.build.ConfigurablePlugin
customizeBuildRequirements, removeBuildRequirements
 
Methods inherited from interface com.atlassian.bamboo.v2.build.BuildConfigurationAwarePlugin
addDefaultValues, prepareConfigObject, validate
 
Methods inherited from interface com.atlassian.bamboo.plugin.InitablePluginModule
init
 
Methods inherited from interface com.atlassian.bamboo.v2.build.RenderableBuildConfiguration
getEditHtml, getViewHtml
 
Methods inherited from interface com.atlassian.bamboo.utils.DescriptionProvider
getDescription
 
Methods inherited from interface com.atlassian.bamboo.v2.build.repository.CustomSourceDirectoryAwareRepository
retrieveSourceCode
 

Method Detail

mergeWorkspaceWith

boolean mergeWorkspaceWith(@NotNull
                           BuildContext buildContext,
                           @NotNull
                           java.io.File checkoutDirectory,
                           @NotNull
                           java.lang.String targetRevision)
                           throws RepositoryException
Merges a workspace located in checkout directory with the target revision.

Parameters:
buildContext - the build context of build doing the merge
checkoutDirectory - the workspace to use for merge
targetRevision - the revision to merge with
Returns:
true if the result of the merge would result in a non-empty commit
Throws:
RepositoryException

isMergingSupported

boolean isMergingSupported()

retrieveSourceCode

@NotNull
java.lang.String retrieveSourceCode(@NotNull
                                            BuildContext buildContext,
                                            @Nullable
                                            java.lang.String vcsRevisionKey,
                                            @NotNull
                                            java.io.File sourceDirectory,
                                            int depth)
                                    throws RepositoryException
Checks out the latest source code from an appropriate repository to specified directory

Parameters:
buildContext -
vcsRevisionKey - - may be null if you want latest code
sourceDirectory - - directory to checkout to
depth - - how many historical revisions we'd like to check out (-1 means all revisions)
Returns:
vcsRevisionKey - the revision
Throws:
RepositoryException

getBranchIntegrationEditHtml

@Nullable
java.lang.String getBranchIntegrationEditHtml()
Gives repository a chance to display a HTML on the UI when user is enabling "Branch Integration" feature

Returns:
HTML snippet to be displayed on UI


Copyright © 2012 Atlassian. All Rights Reserved.