T - The return type of the call() methodpublic abstract class AbstractGitFlowCommand<T> extends Object implements Callable<T>
Most commands should extend this class as it provides common helper methods and methods to ensure valid state.
| Modifier and Type | Field and Description |
|---|---|
protected GitFlowConfiguration |
gfConfig |
protected org.eclipse.jgit.api.Git |
git |
protected JGitFlowReporter |
reporter |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractGitFlowCommand(org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig,
JGitFlowReporter reporter) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getCommandName() |
String |
getScmMessagePrefix() |
boolean |
isAllowUntracked() |
protected void |
requireCleanWorkingTree()
Requires that the local working tree has no un-committed changes
|
protected void |
requireCommitOnBranch(org.eclipse.jgit.revwalk.RevCommit commit,
String branch)
Requires that a local branch contains the given commit
|
protected void |
requireGitFlowInitialized()
Requires that git flow has been initialized for the project represented by the internal {Git} instance
|
protected void |
requireLocalBranchAbsent(String branch)
Requires that a local branch with the given name does not yet exist
|
protected void |
requireLocalBranchExists(String branch)
Requires that a local branch with the given name exists
|
protected void |
requireLocalBranchNotBehindRemote(String branch)
Requires that the local branch with the given name is not behind a remote brach with the same name
|
protected void |
requireNoExistingHotfixBranches()
Requires that no hotfix branches already exist
|
protected void |
requireNoExistingReleaseBranches()
Requires that no release branches already exist
|
protected void |
requireRemoteBranchAbsent(String branch)
Requires that a remote branch with the given name does not yet exist
|
protected void |
requireRemoteBranchExists(String branch)
Requires that a remote branch with the given name exists
|
protected void |
requireTagAbsent(String name)
Requires that a tag with the given name does not yet exist
|
AbstractGitFlowCommand |
setAllowUntracked(boolean allow) |
AbstractGitFlowCommand |
setScmMessagePrefix(String scmMessagePrefix) |
protected final org.eclipse.jgit.api.Git git
protected final GitFlowConfiguration gfConfig
protected final JGitFlowReporter reporter
protected AbstractGitFlowCommand(org.eclipse.jgit.api.Git git,
GitFlowConfiguration gfConfig,
JGitFlowReporter reporter)
public AbstractGitFlowCommand setAllowUntracked(boolean allow)
public boolean isAllowUntracked()
public String getScmMessagePrefix()
public AbstractGitFlowCommand setScmMessagePrefix(String scmMessagePrefix)
protected void requireGitFlowInitialized()
throws NotInitializedException,
JGitFlowGitAPIException
protected abstract String getCommandName()
protected void requireLocalBranchAbsent(String branch) throws LocalBranchExistsException, JGitFlowGitAPIException
branch - the name of the branch to testLocalBranchExistsExceptionJGitFlowGitAPIExceptionprotected void requireLocalBranchExists(String branch) throws LocalBranchMissingException, JGitFlowGitAPIException
branch - The name of the branch to testLocalBranchMissingExceptionJGitFlowGitAPIExceptionprotected void requireRemoteBranchAbsent(String branch) throws RemoteBranchExistsException, JGitFlowGitAPIException
branch - The name of the branch to testRemoteBranchExistsExceptionJGitFlowGitAPIExceptionprotected void requireRemoteBranchExists(String branch) throws RemoteBranchMissingException, JGitFlowGitAPIException
branch - The name of the branch to testRemoteBranchMissingExceptionJGitFlowGitAPIExceptionprotected void requireTagAbsent(String name) throws TagExistsException, JGitFlowGitAPIException
name - The name of the tag to testTagExistsExceptionJGitFlowGitAPIExceptionprotected void requireLocalBranchNotBehindRemote(String branch) throws BranchOutOfDateException, JGitFlowIOException
branch - The name of the branch to testBranchOutOfDateExceptionJGitFlowIOExceptionprotected void requireCleanWorkingTree()
throws DirtyWorkingTreeException,
JGitFlowIOException,
JGitFlowGitAPIException
protected void requireNoExistingReleaseBranches()
throws ReleaseBranchExistsException,
JGitFlowGitAPIException
protected void requireNoExistingHotfixBranches()
throws HotfixBranchExistsException,
JGitFlowGitAPIException
protected void requireCommitOnBranch(org.eclipse.jgit.revwalk.RevCommit commit,
String branch)
throws LocalBranchExistsException,
JGitFlowGitAPIException,
JGitFlowIOException
commit - the commit to testbranch - the name of the branch to checkLocalBranchMissingExceptionJGitFlowGitAPIExceptionLocalBranchExistsExceptionJGitFlowIOExceptionCopyright © 2013 Atlassian. All Rights Reserved.