.setSource(branchOrCommit).addPaths(paths).setOurs(ours).setTheirs(theirs) .call();
.setSource(branchOrCommit).addPaths(paths).setOurs(ours).setTheirs(theirs) .call();
.setSource(branchOrCommit).addPaths(paths).setOurs(ours).setTheirs(theirs) .call();
@Test public void testCheckoutPathFilterWithMultiplePaths() throws Exception { ObjectId points1Id = insertAndAdd(points1); ObjectId lines1Id = insertAndAdd(lines1); geogig.command(CommitOp.class).setMessage("commit 1").call(); insert(points1_modified); insert(lines2); Collection<String> paths = Arrays.asList("Points/Points.1", "Lines"); CheckoutResult result = geogig.command(CheckoutOp.class).addPaths(paths).call(); Optional<RevTree> workTree = geogig.command(RevObjectParse.class) .setObjectId(result.getNewTree()).call(RevTree.class); Optional<NodeRef> nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Points/Points.1").call(); assertEquals(points1Id, nodeRef.get().getNode().getObjectId()); nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Lines/Lines.1").call(); assertEquals(lines1Id, nodeRef.get().getNode().getObjectId()); nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Lines/Lines.2").call(); assertFalse(nodeRef.isPresent()); }
@Test public void testCheckoutPathFilterWithMultiplePaths() throws Exception { ObjectId points1Id = insertAndAdd(points1); ObjectId lines1Id = insertAndAdd(lines1); geogig.command(CommitOp.class).setMessage("commit 1").call(); insert(points1_modified); insert(lines2); Collection<String> paths = Arrays.asList("Points/Points.1", "Lines"); CheckoutResult result = geogig.command(CheckoutOp.class).addPaths(paths).call(); Optional<RevTree> workTree = geogig.command(RevObjectParse.class) .setObjectId(result.getNewTree()).call(RevTree.class); Optional<NodeRef> nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Points/Points.1").call(); assertEquals(points1Id, nodeRef.get().getNode().getObjectId()); nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Lines/Lines.1").call(); assertEquals(lines1Id, nodeRef.get().getNode().getObjectId()); nodeRef = geogig.command(FindTreeChild.class).setParent(workTree.get()) .setChildPath("Lines/Lines.2").call(); assertFalse(nodeRef.isPresent()); }
assertEquals(oID4, featureBlob4.get().getObjectId()); geogig.command(CheckoutOp.class).setSource("master").addPaths(paths).call();
assertEquals(oID4, featureBlob4.get().getObjectId()); geogig.command(CheckoutOp.class).setSource("master").addPaths(paths).call();