Package com.atlassian.jgitflow.core

Examples of com.atlassian.jgitflow.core.ReleaseMergeResult


        ReleaseFinishExtensionForTests extension = new ReleaseFinishExtensionForTests();
        extension.withException(BaseExtensionForTests.BEFORE_DEVELOP_CHECKOUT, ExtensionFailStrategy.ERROR);

        try
        {
            ReleaseMergeResult result = flow.releaseFinish("1.0").setFetch(true).setPush(true).setExtension(extension).call();

            fail("Exception should have been thrown!!");
        }
        catch (JGitFlowExtensionException e)
        {
View Full Code Here


        RevCommit localcommit = flow.git().commit().setMessage("adding junk file").call();

        ReleaseFinishExtensionForTests extension = new ReleaseFinishExtensionForTests();
        extension.withException(BaseExtensionForTests.BEFORE_DEVELOP_CHECKOUT, ExtensionFailStrategy.WARN);

        ReleaseMergeResult result = flow.releaseFinish("1.0").setFetch(true).setPush(true).setExtension(extension).call();

        assertTrue(result.wasSuccessful());

        assertTrue("before was not called", extension.wasCalled(BaseExtensionForTests.BEFORE));
        assertTrue("beforeFetch was not called", extension.wasCalled(BaseExtensionForTests.BEFORE_FETCH));
        assertTrue("afterFetch was not called", extension.wasCalled(BaseExtensionForTests.AFTER_FETCH));
        assertTrue("beforeMasterCheckout was not called", extension.wasCalled(BaseExtensionForTests.BEFORE_MASTER_CHECKOUT));
View Full Code Here

        flow.releaseStart("1.0").call();

        assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());
       
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        //create a new file
        File junkFile = new File(git.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();
        assertTrue(result.wasSuccessful());
    }
View Full Code Here

        File junkFile = new File(git.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");
        git.add().addFilepattern(junkFile.getName()).call();

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();
        assertTrue(result.wasSuccessful());
    }
View Full Code Here

        //make sure develop doesn't report our commit yet
        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        //make sure develop doesn't report our commit yet
        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").setNoMerge(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        flow.releaseStart("1.0").call();

        //just in case
        assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());

        ReleaseMergeResult result = flow.releaseFinish("1.0").setKeepBranch(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should still exist
View Full Code Here

        //make sure develop doesn't have our commits yet
        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));
        assertFalse(GitHelper.isMergedInto(git, commit2, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        //make sure develop doesn't have our commits yet
        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));
        assertFalse(GitHelper.isMergedInto(git, commit2, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").setSquash(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

TOP

Related Classes of com.atlassian.jgitflow.core.ReleaseMergeResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.