use of org.locationtech.geogig.api.porcelain.CherryPickOp in project GeoGig by boundlessgeo.
the class CherryPickOpTest method testCherryPickDirtyIndex.
@Test
public void testCherryPickDirtyIndex() throws Exception {
insertAndAdd(points1);
geogig.command(CommitOp.class).setMessage("commit for " + idP1).call();
// create branch1 and checkout
geogig.command(BranchCreateOp.class).setAutoCheckout(true).setName("branch1").call();
insertAndAdd(points2);
RevCommit c1 = geogig.command(CommitOp.class).setMessage("commit for " + idP2).call();
// checkout master and insert some features
geogig.command(CheckoutOp.class).setSource("master").call();
insertAndAdd(points3);
CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
cherryPick.setCommit(Suppliers.ofInstance(c1.getId()));
exception.expect(IllegalStateException.class);
cherryPick.call();
}
use of org.locationtech.geogig.api.porcelain.CherryPickOp in project GeoGig by boundlessgeo.
the class CherryPickOpTest method testCherryPickInvalidCommit.
@Test
public void testCherryPickInvalidCommit() throws Exception {
CherryPickOp cherryPick = geogig.command(CherryPickOp.class);
cherryPick.setCommit(Suppliers.ofInstance(ObjectId.NULL));
exception.expect(IllegalArgumentException.class);
cherryPick.call();
}
Aggregations