Examples of CheckoutResult


Examples of org.locationtech.geogig.api.porcelain.CheckoutResult

        RevCommit c2 = geogig.command(CommitOp.class).setMessage("commit 2").call();
        insertAndAdd(points3);
        geogig.command(CommitOp.class).setMessage("commit 3").call();
        insert(points1_modified);

        CheckoutResult result = geogig.command(CheckoutOp.class)
                .setSource(c2.getTreeId().toString()).addPath("Points").call();

        Optional<RevTree> workTree = geogig.command(RevObjectParse.class)
                .setObjectId(result.getNewTree()).call(RevTree.class);
        Optional<NodeRef> nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get())
                .setChildPath("Points/Points.1").call();

        assertEquals(points1Id, nodeRef.get().getNode().getObjectId());
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.CheckoutResult

    public void testCheckoutBranchWithForceOptionAndChangesInTheIndex() throws Exception {
        insertAndAdd(points1);
        RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();
        Ref branch1 = geogig.command(BranchCreateOp.class).setName("branch1").call();
        insertAndAdd(points2);
        CheckoutResult result = geogig.command(CheckoutOp.class).setSource("branch1")
                .setForce(true).call();

        assertEquals(c1.getTreeId(), result.getNewTree());
        assertTrue(geogig.command(RefParse.class).setName(Ref.HEAD).call().get() instanceof SymRef);
        assertEquals(branch1.getName(), ((SymRef) geogig.command(RefParse.class).setName(Ref.HEAD)
                .call().get()).getTarget());
    }
View Full Code Here

Examples of org.locationtech.geogig.api.porcelain.CheckoutResult

        insertAndAdd(lines3);
        geogig.command(CommitOp.class).setMessage("commit 6").call();

        geogig.command(CheckoutOp.class).setSource("master").call();

        CheckoutResult result = geogig.command(CheckoutOp.class).setSource("branch1")
                .addPath("Lines/Lines.1").call();

        Optional<RevTree> workTree = geogig.command(RevObjectParse.class)
                .setObjectId(result.getNewTree()).call(RevTree.class);

        Optional<NodeRef> nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get())
                .setChildPath("Points/Points.1").call();
        assertTrue(nodeRef.isPresent());
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.