Package com.atlassian.jgitflow.core

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


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

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

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

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

        //release branch should be gone
View Full Code Here


        File versionFile = new File(git.getRepository().getWorkTree(), "version.txt");
        FileUtils.writeStringToFile(versionFile, hfOneLabel);
        git.add().addFilepattern(".").call();
        git.commit().setMessage("commiting version 1").call();
       
        flow.hotfixFinish(hfOneLabel).call();

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());
        FileUtils.writeStringToFile(versionFile, "develop");
        git.add().addFilepattern(".").call();
View Full Code Here

        FileUtils.writeStringToFile(versionFile, hfTwoLabel);
        git.add().addFilepattern(".").call();
        git.commit().setMessage("commiting version 2").call();

        flow.hotfixFinish(hfTwoLabel).call();

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

    }
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
        flow.hotfixFinish("1.0").call();
    }

    @Test(expected = DirtyWorkingTreeException.class)
    public void finishHotfixUnCommittedFile() throws Exception
    {
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
        flow.hotfixFinish("1.0").call();
    }

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

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

        //try to finish
        flow.hotfixFinish("1.0").call();

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

        //release branch should be gone
View Full Code Here

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

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

        flow.hotfixFinish("1.0").setKeepBranch(true).call();

        //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
        flow.hotfixFinish("1.0").call();

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

        //release branch should be gone
View Full Code Here

        File junkFile = new File(remoteGit.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");
        remoteGit.add().addFilepattern(junkFile.getName()).call();
        remoteGit.commit().setMessage("adding junk file").call();

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

    }

    @Test(expected = BranchOutOfDateException.class)
    public void finishHotfixMasterBehindRemoteWithFetch() throws Exception
View Full Code Here

        File junkFile = new File(remoteGit.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");
        remoteGit.add().addFilepattern(junkFile.getName()).call();
        remoteGit.commit().setMessage("adding junk file").call();

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

    }

    @Test
    public void finishHotfixMasterIsTagged() throws Exception
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.