Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.CherryPickOp.call()


        insertAndAdd(points3);

        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(c1.getId()));
        exception.expect(IllegalStateException.class);
        cherryPick.call();
    }

    @Ignore
    // this test probably does not make sense with the current behaviour of cherry pick
    @Test
View Full Code Here


        insertAndAdd(points1);
        final RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();

        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(c1.getId()));
        cherryPick.call();

        Iterator<RevCommit> log = geogig.command(LogOp.class).call();

        // Commit 2
        RevCommit logC2 = log.next();
View Full Code Here

        final RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();

        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(c1.getId()));
        exception.expect(NothingToCommitException.class);
        cherryPick.call();
    }
}
View Full Code Here

        Optional<ObjectId> commitId;
        commitId = geogig.command(RevParse.class).setRefSpec(commits.get(0)).call();
        checkParameter(commitId.isPresent(), "Commit not found '%s'", commits.get(0));
        cherryPick.setCommit(Suppliers.ofInstance(commitId.get()));

        cherryPick.call();

    }
}
View Full Code Here

        // switch back to master
        geogig.command(CheckoutOp.class).setSource("master").call();
        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(c5.getId()));
        RevCommit commit2 = cherryPick.call();

        assertEquals(c5.getAuthor(), commit2.getAuthor());
        assertEquals(c5.getCommitter().getName(), commit2.getCommitter().getName());
        assertEquals(c5.getMessage(), commit2.getMessage());
        assertFalse(c5.getCommitter().getTimestamp() == commit2.getCommitter().getTimestamp());
View Full Code Here

        assertEquals(c5.getMessage(), commit2.getMessage());
        assertFalse(c5.getCommitter().getTimestamp() == commit2.getCommitter().getTimestamp());
        assertFalse(c5.getTreeId().equals(commit2.getTreeId()));

        cherryPick.setCommit(Suppliers.ofInstance(c3.getId()));
        RevCommit commit3 = cherryPick.call();

        assertEquals(c3.getAuthor(), commit3.getAuthor());
        assertEquals(c3.getCommitter().getName(), commit3.getCommitter().getName());
        assertEquals(c3.getMessage(), commit3.getMessage());
        assertFalse(c3.getCommitter().getTimestamp() == commit3.getCommitter().getTimestamp());
View Full Code Here

        assertEquals(c3.getMessage(), commit3.getMessage());
        assertFalse(c3.getCommitter().getTimestamp() == commit3.getCommitter().getTimestamp());
        assertFalse(c3.getTreeId().equals(commit3.getTreeId()));

        cherryPick.setCommit(Suppliers.ofInstance(c2.getId()));
        RevCommit commit4 = cherryPick.call();

        assertEquals(c2.getAuthor(), commit4.getAuthor());
        assertEquals(c2.getCommitter().getName(), commit4.getCommitter().getName());
        assertEquals(c2.getCommitter().getEmail(), commit4.getCommitter().getEmail());
        assertEquals(c2.getMessage(), commit4.getMessage());
View Full Code Here

    @Test
    public void testCherryPickInvalidCommit() throws Exception {
        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(ObjectId.NULL));
        exception.expect(IllegalArgumentException.class);
        cherryPick.call();
    }

    @Test
    public void testCherryPickDirtyWorkTree() throws Exception {
        insertAndAdd(points1);
View Full Code Here

        insert(points3);

        CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
        cherryPick.setCommit(Suppliers.ofInstance(c1.getId()));
        exception.expect(IllegalStateException.class);
        cherryPick.call();
    }

    @Test
    public void testCherryPickDirtyIndex() throws Exception {
        insertAndAdd(points1);
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.