public class

MergeCommandParameters

extends AbstractMergeCommandParameters
java.lang.Object
   ↳ com.atlassian.stash.util.BuilderSupport
     ↳ com.atlassian.stash.scm.AbstractCommandParameters
       ↳ com.atlassian.stash.scm.AbstractMergeCommandParameters
         ↳ com.atlassian.stash.scm.MergeCommandParameters

Summary

Nested Classes
class MergeCommandParameters.Builder  
[Expand]
Inherited Fields
From class com.atlassian.stash.util.BuilderSupport
Public Constructors
@Deprecated MergeCommandParameters(StashUser author, boolean dryRun, String message, String fromBranch, String fromChangesetId, String toBranch)
This constructor is deprecated. This constructor will be made private in 3.0. Instances of this class should be created using the MergeCommandParameters.Builder, which is more robust for handling API changes across versions.
Public Methods
@Nonnull String getFromBranch()
@Nullable String getFromChangesetId()
Retrieves the specific changeset that should be merged into the target branch.
@Nullable Repository getFromRepository()
Retrieves the repository containing the from getFromBranch() and changeset.
@Nonnull String getToBranch()
boolean hasFromRepository()
Retrieves a flag indicating whether these parameters include a from repository, indicating the merge is cross-repository, where the to repository is provided when requesting the merge command rather than in these parameters.
[Expand]
Inherited Methods
From class com.atlassian.stash.scm.AbstractMergeCommandParameters
From class com.atlassian.stash.util.BuilderSupport
From class java.lang.Object

Public Constructors

@Deprecated public MergeCommandParameters (StashUser author, boolean dryRun, String message, String fromBranch, String fromChangesetId, String toBranch)

This constructor is deprecated.
This constructor will be made private in 3.0. Instances of this class should be created using the MergeCommandParameters.Builder, which is more robust for handling API changes across versions.

Public Methods

@Nonnull public String getFromBranch ()

@Nullable public String getFromChangesetId ()

Retrieves the specific changeset that should be merged into the target branch.

If this value is not provided, the current tip of the source branch is merged into the target. This should be used with caution, as it may result in the system performing a different merge than intended if the source branch changes between when the merge is requested and when it is performed.

Returns
  • the specific changeset to merge in, or null to merge the current tip of the branch

@Nullable public Repository getFromRepository ()

Retrieves the repository containing the from getFromBranch() and changeset.

Returns
  • the from repository, or null if the from and to branches are in the same repository

@Nonnull public String getToBranch ()

public boolean hasFromRepository ()

Retrieves a flag indicating whether these parameters include a from repository, indicating the merge is cross-repository, where the to repository is provided when requesting the merge command rather than in these parameters.

Returns