Package com.atlassian.jgitflow.core

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


        gfGit = Git.cloneRepository().setDirectory(workDir).setURI("file://" + remoteGit.getRepository().getWorkTree().getPath()).call();
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(gfGit.getRepository().getWorkTree()).setInitContext(ctx).call();

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());
       
        File gitDir = gfGit.getRepository().getDirectory();
        File gitConfig = new File(gitDir, "config");

        assertTrue(gitConfig.exists());
View Full Code Here


        remoteGit = RepoUtil.createRepositoryWithBranches(newDir(), "own");
        gfGit = Git.cloneRepository().setDirectory(workDir).setURI("file://" + remoteGit.getRepository().getWorkTree().getPath()).call();
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(gfGit.getRepository().getWorkTree()).setInitContext(ctx).call();

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());
       
        File gitDir = gfGit.getRepository().getDirectory();
        File gitConfig = new File(gitDir, "config");
View Full Code Here

        gfGit = Git.cloneRepository().setDirectory(workDir).setURI("file://" + remoteGit.getRepository().getWorkTree().getPath()).call();
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(gfGit.getRepository().getWorkTree()).setInitContext(ctx).call();

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());
       
        File gitDir = gfGit.getRepository().getDirectory();
        File gitConfig = new File(gitDir, "config");

        assertTrue(gitConfig.exists());
View Full Code Here

        nested2.mkdirs();
       
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(nested2).call();

        flow.git().checkout().setName("develop").call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());

        File gitDir = git.getRepository().getDirectory();
        File gitConfig = new File(gitDir, "config");
View Full Code Here

       
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(nested2).call();

        flow.git().checkout().setName("develop").call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());

        File gitDir = git.getRepository().getDirectory();
        File gitConfig = new File(gitDir, "config");

        assertTrue(gitConfig.exists());
View Full Code Here

    {
        Git git = RepoUtil.createRepositoryWithMaster(newDir());
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());
       
        flow.featureStart("my-feature").call();

        assertEquals(flow.getFeatureBranchPrefix() + "my-feature", git.getRepository().getBranch());
View Full Code Here

        FileUtils.writeStringToFile(junkFile, "I am junk");
        remoteGit.add().addFilepattern(junkFile.getName()).call();
        remoteGit.commit().setMessage("adding junk file").call();

        //update local
        flow.git().checkout().setName(flow.getDevelopBranchName()).call();
        git.pull().call();
       
        flow.featureStart("my-feature").setFetchDevelop(true).call();

    }
View Full Code Here

        Git git = RepoUtil.createRepositoryWithMasterAndDevelop(newDir());
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();

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

        //switch to master
        git.checkout().setName("master").call();
       
View Full Code Here

    {
        File workDir = newDir();
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(workDir).call();

        flow.git().checkout().setName("develop").call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());
       
        File gitDir = new File(workDir, ".git");
        File gitConfig = new File(gitDir, "config");
View Full Code Here

        File workDir = newDir();
        JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
        JGitFlow flow = initCommand.setDirectory(workDir).call();

        flow.git().checkout().setName("develop").call();
        assertEquals(flow.getDevelopBranchName(), flow.git().getRepository().getBranch());
       
        File gitDir = new File(workDir, ".git");
        File gitConfig = new File(gitDir, "config");

        assertTrue(gitConfig.exists());
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.