Package org.locationtech.geogig.api.porcelain

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


        return remoteRepoFetch;
    }

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

        LsRemote lsRemote = lsremote();
View Full Code Here


        logs = localGeogig.geogig.command(LogOp.class).call();
        assertNotNull(logs);
        assertFalse(logs.hasNext());

        // clone from the remote
        CloneOp clone = clone();
        clone.setDepth(0);
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).call();

        // Make sure the local repository got all of the commits
        logs = localGeogig.geogig.command(LogOp.class).call();
        logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
View Full Code Here

        logs = localGeogig.geogig.command(LogOp.class).call();
        assertNotNull(logs);
        assertFalse(logs.hasNext());

        // clone from the remote
        CloneOp clone = clone();
        clone.setDepth(0);
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).call();

        // Make sure the local repository got all of the commits
        logs = localGeogig.geogig.command(LogOp.class).call();
        logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
View Full Code Here

        // Create and checkout branch1
        remoteGeogig.geogig.command(BranchDeleteOp.class).setName("Branch1").call();

        // clone from the remote
        CloneOp clone = clone();
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).setBranch("master").call();

        // Make sure the local repository got all of the commits
        logs = localGeogig.geogig.command(LogOp.class).setFirstParentOnly(true).call();
        logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
View Full Code Here

        logs = localGeogig.geogig.command(LogOp.class).call();
        assertNotNull(logs);
        assertFalse(logs.hasNext());

        // clone from the remote
        CloneOp clone = clone();
        clone.setDepth(2);
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).call();

        // Make sure the local repository got only 2 commits
        logs = localGeogig.geogig.command(LogOp.class).call();
        logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
View Full Code Here

        logs = localGeogig.geogig.command(LogOp.class).call();
        assertNotNull(logs);
        assertFalse(logs.hasNext());

        // clone from the remote
        CloneOp clone = clone();
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).setBranch("Branch1").call();

        // Make sure the local repository got all of the commits
        logs = localGeogig.geogig.command(LogOp.class).call();
        logged = new ArrayList<RevCommit>();
        for (; logs.hasNext();) {
View Full Code Here

        assertEquals(expectedMaster, logged);
    }

    @Test
    public void testCloneEmptyRepo() throws Exception {
        CloneOp clone = clone();
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).call();
    }
View Full Code Here

        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).call();
    }

    @Test
    public void testCloneNoRepoSpecified() throws Exception {
        CloneOp clone = clone();
        exception.expect(IllegalArgumentException.class);
        clone.call();
    }
View Full Code Here

        clone.call();
    }

    @Test
    public void testCloneEmptyRepoString() throws Exception {
        CloneOp clone = clone();
        exception.expect(IllegalArgumentException.class);
        clone.setRepositoryURL("").call();
    }
View Full Code Here

        insertAndAdd(remoteGeogig.geogig, lines2);
        remoteGeogig.geogig.command(CommitOp.class).call();

        // clone from the remote
        CloneOp clone = clone();
        clone.setRepositoryURL(remoteGeogig.envHome.getCanonicalPath()).setBranch("Branch1").call();
    }
View Full Code Here

TOP

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

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.