Examples of FetchOp


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

    @Test
    public void testFetchDepthWithFullRepo() throws Exception {
        prepareForFetch(true);

        FetchOp fetch = fetch();
        fetch.setDepth(2);
        fetch.call();

        verifyFetch();
    }
View Full Code Here

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

    @Test
    public void testFetchFullDepthWithFullRepo() throws Exception {
        prepareForFetch(true);

        FetchOp fetch = fetch();
        fetch.setFullDepth(true);
        fetch.call();

        verifyFetch();
    }
View Full Code Here

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

    @Test
    public void testFetchAll() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.setAll(true).call();

        verifyFetch();
    }
View Full Code Here

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

    @Test
    public void testFetchSpecificRemote() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.addRemote("origin").call();

        verifyFetch();
    }
View Full Code Here

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

    @Test
    public void testFetchSpecificRemoteAndAll() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.addRemote("origin").setAll(true).call();

        verifyFetch();
    }
View Full Code Here

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

        verifyFetch();
    }

    @Test
    public void testFetchNoRemotes() throws Exception {
        FetchOp fetch = fetch();
        exception.expect(IllegalStateException.class);
        fetch.call();
    }
View Full Code Here

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

    @Test
    public void testFetchNoChanges() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.addRemote("origin").setAll(true).call();

        verifyFetch();

        // fetch again
        fetch.call();

        verifyFetch();
    }
View Full Code Here

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

    @Test
    public void testFetchWithPrune() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.addRemote("origin").setAll(true).call();

        verifyFetch();

        // Remove a branch from the remote
        remoteGeogig.geogig.command(BranchDeleteOp.class).setName("Branch1").call();

        // fetch again
        fetch = fetch();
        fetch.setPrune(true).call();

        verifyPrune();
    }
View Full Code Here

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

    @Test
    public void testFetchWithPruneAndBranchAdded() throws Exception {
        prepareForFetch(true);

        // fetch from the remote
        FetchOp fetch = fetch();
        fetch.addRemote("origin").setAll(true).call();

        verifyFetch();

        // Remove a branch from the remote
        remoteGeogig.geogig.command(BranchDeleteOp.class).setName("Branch1").call();

        // Add another branch
        remoteGeogig.geogig.command(BranchCreateOp.class).setName("Branch2").call();

        // fetch again
        fetch = fetch();
        fetch.setPrune(true).call();

        verifyPrune();

        // Make sure the local repository has Branch2
        Optional<Ref> missing = localGeogig.geogig.command(RefParse.class)
View Full Code Here

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

                    "Depth operations can only be used on a shallow clone.");
        }

        TransferSummary result;
        try {
            FetchOp fetch = cli.getGeogig().command(FetchOp.class);
            fetch.setProgressListener(cli.getProgressListener());
            fetch.setAll(all).setPrune(prune).setFullDepth(fulldepth);
            fetch.setDepth(depth);

            if (args != null) {
                for (String repo : args) {
                    fetch.addRemote(repo);
                }
            }

            result = fetch.call();
        } catch (SynchronizationException e) {
            switch (e.statusCode) {
            case HISTORY_TOO_SHALLOW:
            default:
                throw new CommandFailedException("Unable to fetch, the remote history is shallow.",
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.