Search in sources :

Example 16 with FetchOp

use of org.locationtech.geogig.api.porcelain.FetchOp in project GeoGig by boundlessgeo.

the class FetchOpTest method testFetchWithPrune.

@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();
}
Also used : FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) Test(org.junit.Test)

Example 17 with FetchOp

use of org.locationtech.geogig.api.porcelain.FetchOp in project GeoGig by boundlessgeo.

the class FetchOpTest method testFetch.

@Test
public void testFetch() throws Exception {
    prepareForFetch(true);
    // fetch from the remote
    FetchOp fetch = fetch();
    fetch.call();
    verifyFetch();
}
Also used : FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) Test(org.junit.Test)

Example 18 with FetchOp

use of org.locationtech.geogig.api.porcelain.FetchOp in project GeoGig by boundlessgeo.

the class FetchOpTest method testFetchFullDepth.

@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();
    verifyFetch();
}
Also used : CloneOp(org.locationtech.geogig.api.porcelain.CloneOp) FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) Test(org.junit.Test)

Example 19 with FetchOp

use of org.locationtech.geogig.api.porcelain.FetchOp in project GeoGig by boundlessgeo.

the class FetchOpTest method testFetchFullDepthWithFullRepo.

@Test
public void testFetchFullDepthWithFullRepo() throws Exception {
    prepareForFetch(true);
    FetchOp fetch = fetch();
    fetch.setFullDepth(true);
    fetch.call();
    verifyFetch();
}
Also used : FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) Test(org.junit.Test)

Example 20 with FetchOp

use of org.locationtech.geogig.api.porcelain.FetchOp in project GeoGig by boundlessgeo.

the class FetchOpTest method testFetchSpecificRemote.

@Test
public void testFetchSpecificRemote() throws Exception {
    prepareForFetch(true);
    // fetch from the remote
    FetchOp fetch = fetch();
    fetch.addRemote("origin").call();
    verifyFetch();
}
Also used : FetchOp(org.locationtech.geogig.api.porcelain.FetchOp) Test(org.junit.Test)

Aggregations

FetchOp (org.locationtech.geogig.api.porcelain.FetchOp)21 Test (org.junit.Test)15 CloneOp (org.locationtech.geogig.api.porcelain.CloneOp)6 RevCommit (org.locationtech.geogig.api.RevCommit)4 LsRemote (org.locationtech.geogig.api.plumbing.LsRemote)4 LogOp (org.locationtech.geogig.api.porcelain.LogOp)4 CommitOp (org.locationtech.geogig.api.porcelain.CommitOp)3 Remote (org.locationtech.geogig.api.Remote)2 SynchronizationException (org.locationtech.geogig.api.porcelain.SynchronizationException)2 TransferSummary (org.locationtech.geogig.api.porcelain.TransferSummary)2 ConsoleReader (jline.console.ConsoleReader)1 Context (org.locationtech.geogig.api.Context)1 Ref (org.locationtech.geogig.api.Ref)1 SendPack (org.locationtech.geogig.api.plumbing.SendPack)1 PullOp (org.locationtech.geogig.api.porcelain.PullOp)1 PushOp (org.locationtech.geogig.api.porcelain.PushOp)1 CommandFailedException (org.locationtech.geogig.cli.CommandFailedException)1 DeduplicationService (org.locationtech.geogig.storage.DeduplicationService)1 CommandContext (org.locationtech.geogig.web.api.CommandContext)1 CommandResponse (org.locationtech.geogig.web.api.CommandResponse)1