use of org.eclipse.egit.gitflow.op.ReleaseStartOperation in project egit by eclipse.
the class BranchNameValidatorTest method testBranchNotExists.
@Test
public void testBranchNotExists() throws Exception {
testRepository.createInitialCommit("testInitOperation\n\nfirst commit\n");
Repository repository = testRepository.getRepository();
new InitOperation(repository).execute(null);
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertFalse(releaseExists(gfRepo, "notThere"));
}
use of org.eclipse.egit.gitflow.op.ReleaseStartOperation in project egit by eclipse.
the class BranchNameValidatorTest method testReleaseExists.
@Test
public void testReleaseExists() throws Exception {
testRepository.createInitialCommit("testInitOperation\n\nfirst commit\n");
Repository repository = testRepository.getRepository();
new InitOperation(repository).execute(null);
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertTrue(releaseExists(gfRepo, MY_RELEASE));
}
use of org.eclipse.egit.gitflow.op.ReleaseStartOperation in project egit by eclipse.
the class GitFlowRepositoryTest method testGetReleaseBranches.
@Test
public void testGetReleaseBranches() throws Exception {
repository1.createInitialCommit("testGetReleaseBranches\n\nfirst commit\n");
Repository repository = repository1.getRepository();
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new InitOperation(repository).execute(null);
assertTrue(gfRepo.getReleaseBranches().isEmpty());
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
assertEquals(R_HEADS + gfRepo.getConfig().getReleasePrefix() + MY_RELEASE, gfRepo.getReleaseBranches().get(0).getName());
}
use of org.eclipse.egit.gitflow.op.ReleaseStartOperation in project egit by eclipse.
the class GitFlowRepositoryTest method testGetHotfixBranches.
@Test
public void testGetHotfixBranches() throws Exception {
repository1.createInitialCommit("testGetHotfixBranches\n\nfirst commit\n");
Repository repository = repository1.getRepository();
GitFlowRepository gfRepo = new GitFlowRepository(repository);
new InitOperation(repository).execute(null);
assertTrue(gfRepo.getHotfixBranches().isEmpty());
new ReleaseStartOperation(gfRepo, MY_RELEASE).execute(null);
new ReleaseFinishOperation(gfRepo, MY_RELEASE).execute(null);
new HotfixStartOperation(gfRepo, MY_HOTFIX).execute(null);
assertEquals(R_HEADS + gfRepo.getConfig().getHotfixPrefix() + MY_HOTFIX, gfRepo.getHotfixBranches().get(0).getName());
}
use of org.eclipse.egit.gitflow.op.ReleaseStartOperation in project egit by eclipse.
the class ReleaseStartHandler method doExecute.
void doExecute(GitFlowRepository gfRepo, final String startCommitSha1, Shell activeShell) {
InputDialog inputDialog = new InputDialog(activeShell, UIText.ReleaseStartHandler_provideReleaseName, // $NON-NLS-1$
UIText.ReleaseStartHandler_provideANameForTheNewRelease, // $NON-NLS-1$
"", new ReleaseNameValidator(gfRepo));
if (inputDialog.open() != Window.OK) {
return;
}
final String releaseName = inputDialog.getValue();
ReleaseStartOperation releaseStartOperation = new ReleaseStartOperation(gfRepo, startCommitSha1, releaseName);
JobUtil.scheduleUserWorkspaceJob(releaseStartOperation, UIText.ReleaseStartHandler_startingNewRelease, JobFamilies.GITFLOW_FAMILY);
}
Aggregations