Examples of hotfixStart()


Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

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

        flow.hotfixStart("1.0").call();
    }

    @Test(expected = DirtyWorkingTreeException.class)
    public void startHotfixUnCommittedFile() throws Exception
    {
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        //create a new file and add it to the index
        File junkFile = new File(git.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");
        git.add().addFilepattern(junkFile.getName()).call();

        flow.hotfixStart("1.0").call();
    }

    @Test
    public void startHotfixWithNewCommit() throws Exception
    {
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        RevCommit commit = git.commit().setMessage("committing junk file").call();

        //make sure master has our commit
        assertTrue(GitHelper.isMergedInto(git, commit, flow.getMasterBranchName()));

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

        assertEquals(flow.getHotfixBranchPrefix() + "1.0", git.getRepository().getBranch());

        //the hotfix branch should have our commit
        assertTrue("hotfix branch does not have our commit: " + commit.toString(), GitHelper.isMergedInto(git, commit, flow.getHotfixBranchPrefix() + "1.0"));
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        git.branchCreate().setName(flow.getHotfixBranchPrefix() + "1.0").call();

        flow.hotfixStart("1.0").call();
    }

    @Test(expected = TagExistsException.class)
    public void startHotfixWithExistingLocalTag() throws Exception
    {
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        git.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.hotfixStart("1.0").call();
    }

    @Test(expected = TagExistsException.class)
    public void startHotfixWithExistingLocalPrefixedTag() throws Exception
    {
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        List<Ref> refs = git.tagList().call();
        String name = refs.get(0).getName();

        assertEquals(Constants.R_TAGS + "vtag/1.0",name);

        flow.hotfixStart("1.0").call();
    }

    @Test(expected = TagExistsException.class)
    public void startHotfixWithExistingRemoteTagAndFetch() throws Exception
    {
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

        flow.hotfixStart("1.0").setFetch(true).call();

    }

    @Test
    public void startHotfixWithExistingRemoteTagNoFetch() throws Exception
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        git.push().setRemote("origin").add("develop").call();

        //add the remote tag
        remoteGit.tag().setName(flow.getVersionTagPrefix() + "1.0").call();

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

        assertEquals(flow.getHotfixBranchPrefix() + "1.0", git.getRepository().getBranch());

    }
}
View Full Code Here

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        //update local
        git.checkout().setName("master").call();
        git.pull().call();
        git.checkout().setName("develop").call();

        flow.hotfixStart("1.0").setFetch(true).setPush(true).setExtension(extension).call();

        assertEquals(flow.getHotfixBranchPrefix() + "1.0", git.getRepository().getBranch());

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

Examples of com.atlassian.jgitflow.core.JGitFlow.hotfixStart()

        git.pull().call();
        git.checkout().setName("develop").call();

        try
        {
            flow.hotfixStart("1.0").setFetch(true).setPush(true).setExtension(extension).call();

            fail("Exception should have been thrown!!");
        }
        catch (JGitFlowExtensionException e)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.