Package org.locationtech.geogig.api.porcelain

Examples of org.locationtech.geogig.api.porcelain.PushOp.addRefSpec()


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

        PushOp push = push();
        push.addRefSpec("refs/heads/master").call();

        logs = remoteGeogig.geogig.command(LogOp.class).call();
        List<RevCommit> logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
            logged.add(logs.next());
View Full Code Here


        MergeOp merge = localGeogig.geogig.command(MergeOp.class);
        MergeReport report = merge.addCommit(Suppliers.ofInstance(expected.get(0).getId()))
                .setMessage("Merge").call();

        PushOp push = push();
        push.addRefSpec("refs/heads/master").call();

        logs = remoteGeogig.geogig.command(LogOp.class).call();
        List<RevCommit> logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
            logged.add(logs.next());
View Full Code Here

        RevCommit commit = localGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Push the commit
        PushOp push = push();
        push.addRefSpec("master:NewRemoteBranch");
        push.call();

        assertTrue(remoteGeogig.geogig.command(RefParse.class).setName("NewRemoteBranch").call()
                .isPresent());
View Full Code Here

        RevCommit commit = localGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Push the commit
        PushOp push = push();
        push.addRefSpec("master:NewRemoteBranch");
        push.addRefSpec("Branch1:NewRemoteBranch2");
        push.call();

        assertTrue(remoteGeogig.geogig.command(RefParse.class).setName("NewRemoteBranch").call()
                .isPresent());
View Full Code Here

        expectedMaster.addFirst(commit);

        // Push the commit
        PushOp push = push();
        push.addRefSpec("master:NewRemoteBranch");
        push.addRefSpec("Branch1:NewRemoteBranch2");
        push.call();

        assertTrue(remoteGeogig.geogig.command(RefParse.class).setName("NewRemoteBranch").call()
                .isPresent());
        assertTrue(remoteGeogig.geogig.command(RefParse.class).setName("NewRemoteBranch2").call()
View Full Code Here

    }

    @Test
    public void testDeleteRemoteBranch() throws Exception {
        PushOp push = push();
        push.addRefSpec(":Branch1");
        push.call();

        assertFalse(remoteGeogig.geogig.command(RefParse.class).setName("Branch1").call()
                .isPresent());
    }
View Full Code Here

        RevCommit commit = localGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Push the commit
        PushOp push = push();
        push.addRefSpec(":");
        push.call();

        // verify that the remote got the commit
        Iterator<RevCommit> logs = remoteGeogig.geogig.command(LogOp.class).call();
        List<RevCommit> logged = new ArrayList<RevCommit>();
View Full Code Here

        expectedBranch.addFirst(commit);
        localGeogig.geogig.command(CheckoutOp.class).setSource("master").call();

        // Push the commit
        PushOp push = push();
        push.addRefSpec("Branch1");
        push.call();

        // verify that the remote got the commit
        Optional<Ref> remoteRef = remoteGeogig.geogig.command(RefParse.class).setName("Branch1")
                .call();
View Full Code Here

        expectedBranch.addFirst(commit);
        localGeogig.geogig.command(CheckoutOp.class).setSource("master").call();

        // Push the commit
        PushOp push = push();
        push.addRefSpec("+Branch1");
        push.call();

        // verify that the remote got the commit
        remoteGeogig.geogig.command(CheckoutOp.class).setSource("Branch1").call();
        Iterator<RevCommit> logs = remoteGeogig.geogig.command(LogOp.class).call();
View Full Code Here

        RevCommit commit = localGeogig.geogig.command(CommitOp.class).call();
        expectedBranch.addFirst(commit);

        // Push the commit
        PushOp push = push();
        push.addRefSpec("Branch1:master:HEAD");
        exception.expect(IllegalArgumentException.class);
        push.call();
    }
}
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.