Package org.locationtech.geogig.api.porcelain

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


    @Test
    public void testFetchDepth() throws Exception {
        prepareForFetch(false);

        // clone the repository
        CloneOp clone = clone();
        clone.setDepth(2);
        String repositoryURL = remoteGeogig.envHome.getCanonicalPath();
        clone.setRepositoryURL(repositoryURL).call();

        FetchOp fetch = fetch();
        fetch.setDepth(3);
        fetch.call();
View Full Code Here


    @Test
    public void testFetchFullDepth() throws Exception {
        prepareForFetch(false);

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

        FetchOp fetch = fetch();
        fetch.setFullDepth(true);
        fetch.call();
View Full Code Here

    @Test
    public void testFetchNewCommitsWithShallowClone() throws Exception {
        prepareForFetch(false);

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

        // Checkout master and commit some changes
        remoteGeogig.geogig.command(CheckoutOp.class).setSource("master").call();

        insertAndAdd(remoteGeogig.geogig, points1_modified);
View Full Code Here

        commit = remoteGeogig.geogig.command(CommitOp.class).setMessage("2").call();
        insertAndAdd(remoteGeogig.geogig, points3);
        commit = remoteGeogig.geogig.command(CommitOp.class).setMessage("3").call();

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

        // Checkout master and commit some changes
        remoteGeogig.geogig.command(CheckoutOp.class).setSource("master").call();

        insertAndAdd(remoteGeogig.geogig, lines1);
View Full Code Here

        List<RevCommit> logged = Lists.newArrayList(logs);

        assertEquals(expectedMaster, logged);

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

        // Create and checkout branch1
        remoteGeogig.geogig.command(BranchCreateOp.class).setAutoCheckout(true).setName("Branch1")
                .setSource(originCommit.getId().toString()).call();
View Full Code Here

        cli.setGeogig(geogig);
        cli.getPlatform().setWorkingDir(repoDir);

        cli.getConsole().println("Cloning into '" + cli.getPlatform().pwd().getName() + "'...");

        CloneOp clone = cli.getGeogig().command(CloneOp.class);
        clone.setProgressListener(cli.getProgressListener());
        clone.setBranch(branch).setRepositoryURL(repoURL);
        clone.setUserName(username).setPassword(password);
        clone.setDepth(depth);

        clone.call();

        cli.getConsole().println("Done.");
    }
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

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.