Package org.locationtech.geogig.api.porcelain

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


        return clone;
    }

    protected PullOp pull() {
        PullOp pull = spy(localGeogig.geogig.command(PullOp.class));
        FetchOp fetch = fetch();
        // when(pull.command(eq(FetchOp.class))).thenReturn(fetch);
        doReturn(fetch).when(pull).command(eq(FetchOp.class));

        LsRemote lsRemote = lsremote();
View Full Code Here


                .setObjectId(oId).call();
        assertTrue(childObject.isPresent());
        assertEquals(commit,
                remoteGeogig.geogig.getRepository().objectDatabase().getCommit(commit.getId()));

        PullOp pull = pull();
        pull.call();

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

                .setMessage(city1.getIdentifier().toString()).call();
        Optional<RevObject> childObject = remoteGeogig.geogig.command(RevObjectParse.class)
                .setObjectId(oId).call();
        assertTrue(childObject.isPresent());

        PullOp pull = pull();
        pull.call();

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

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.setRebase(true).setAll(true).call();

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

                .call();
        localGeogig.geogig.command(UpdateSymRef.class).setName(Ref.HEAD).setNewValue("master")
                .call();

        // Pull the commit
        PullOp pull = pull();
        pull.setRebase(true).call();

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

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.setRemote("origin").call();

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

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.addRefSpec("master:newbranch");
        pull.setRebase(true).call();

        final Optional<Ref> currHead = localGeogig.geogig.command(RefParse.class).setName(Ref.HEAD)
                .call();
        assertTrue(currHead.isPresent());
        assertTrue(currHead.get() instanceof SymRef);
View Full Code Here

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.addRefSpec("+master:newbranch");
        pull.setRebase(true).call();

        final Optional<Ref> currHead = localGeogig.geogig.command(RefParse.class).setName(Ref.HEAD)
                .call();
        assertTrue(currHead.isPresent());
        assertTrue(currHead.get() instanceof SymRef);
View Full Code Here

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.addRefSpec("master:newbranch");
        pull.addRefSpec("Branch1:newbranch2");
        pull.setRebase(true).call();

        final Optional<Ref> currHead = localGeogig.geogig.command(RefParse.class).setName(Ref.HEAD)
                .call();
        assertTrue(currHead.isPresent());
        assertTrue(currHead.get() instanceof SymRef);
View Full Code Here

        insertAndAdd(remoteGeogig.geogig, lines3);
        RevCommit commit = remoteGeogig.geogig.command(CommitOp.class).call();
        expectedMaster.addFirst(commit);

        // Pull the commit
        PullOp pull = pull();
        pull.addRefSpec("master:newbranch:newbranch2");
        exception.expect(IllegalArgumentException.class);
        pull.setRebase(true).call();
    }
View Full Code Here

TOP

Related Classes of org.locationtech.geogig.api.porcelain.PullOp

Copyright © 2018 www.massapicom. 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.