Search in sources :

Example 6 with GitFlowConfig

use of org.eclipse.egit.gitflow.GitFlowConfig in project egit by eclipse.

the class HotfixStartOperation method execute.

@Override
public void execute(IProgressMonitor monitor) throws CoreException {
    GitFlowConfig config = repository.getConfig();
    String branchName = config.getHotfixBranchName(versionName);
    RevCommit head = repository.findHead(config.getMaster());
    if (head == null) {
        throw new IllegalStateException(NLS.bind(CoreText.StartOperation_unableToFindCommitFor, config.getDevelop()));
    }
    start(monitor, branchName, head);
}
Also used : GitFlowConfig(org.eclipse.egit.gitflow.GitFlowConfig) RevCommit(org.eclipse.jgit.revwalk.RevCommit)

Example 7 with GitFlowConfig

use of org.eclipse.egit.gitflow.GitFlowConfig in project egit by eclipse.

the class InitOperation method setBranches.

private void setBranches(String develop, String master) {
    GitFlowConfig config = repository.getConfig();
    config.setBranch(DEVELOP_KEY, develop);
    config.setBranch(MASTER_KEY, master);
}
Also used : GitFlowConfig(org.eclipse.egit.gitflow.GitFlowConfig)

Example 8 with GitFlowConfig

use of org.eclipse.egit.gitflow.GitFlowConfig in project egit by eclipse.

the class InitOperation method setPrefixes.

private void setPrefixes(String feature, String release, String hotfix, String versionTag) {
    GitFlowConfig config = repository.getConfig();
    config.setPrefix(FEATURE_KEY, feature);
    config.setPrefix(RELEASE_KEY, release);
    config.setPrefix(HOTFIX_KEY, hotfix);
    config.setPrefix(VERSION_TAG_KEY, versionTag);
}
Also used : GitFlowConfig(org.eclipse.egit.gitflow.GitFlowConfig)

Aggregations

GitFlowConfig (org.eclipse.egit.gitflow.GitFlowConfig)8 GitFlowRepository (org.eclipse.egit.gitflow.GitFlowRepository)3 RevCommit (org.eclipse.jgit.revwalk.RevCommit)3 Test (org.junit.Test)3 TestRepository (org.eclipse.egit.core.test.TestRepository)1 Repository (org.eclipse.jgit.lib.Repository)1