Examples of parentN()


Examples of org.locationtech.geogig.api.RevCommit.parentN()

        CommitOp commitCommand = geogig.command(CommitOp.class);
        RevCommit commit = commitCommand.setAllowEmpty(true).call();
        assertNotNull(commit);
        assertNotNull(commit.getParentIds());
        assertEquals(0, commit.getParentIds().size());
        assertFalse(commit.parentN(0).isPresent());
        assertNotNull(commit.getId());

        ObjectId commitId = geogig.command(RevParse.class).setRefSpec(Ref.HEAD).call().get();
        assertEquals(commit.getId(), commitId);
    }
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

        geogig.command(AddOp.class).addPattern(".").call();
        RevCommit commit = geogig.command(CommitOp.class).call();
        assertNotNull(commit);
        assertNotNull(commit.getParentIds());
        assertEquals(0, commit.getParentIds().size());
        assertFalse(commit.parentN(0).isPresent());
        assertNotNull(commit.getId());
        assertEquals("groldan", commit.getAuthor().getName().get());
        assertEquals("groldan@boundlessgeo.com", commit.getAuthor().getEmail().get());

        ObjectId treeId = commit.getTreeId();
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

        commitCommand.setCommitter("Jane Doe", "Jane@Doe.com");
        RevCommit commit = commitCommand.call();
        assertNotNull(commit);
        assertNotNull(commit.getParentIds());
        assertEquals(0, commit.getParentIds().size());
        assertFalse(commit.parentN(0).isPresent());
        assertNotNull(commit.getId());
        assertEquals("John Doe", commit.getAuthor().getName().get());
        assertEquals("John@Doe.com", commit.getAuthor().getEmail().get());
        assertEquals("Jane Doe", commit.getCommitter().getName().get());
        assertEquals("Jane@Doe.com", commit.getCommitter().getEmail().get());
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

        RevCommit commit = resolveCommit(objectId);
        if (parentN > commit.getParentIds().size()) {
            return Optional.absent();
        }

        return commit.parentN(parentN - 1);
    }

    /**
     * @param objectId
     * @return
 
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

            return Optional.absent();
        }
        if (ancestorN == 0) {
            return Optional.of(commit.getId());
        }
        Optional<ObjectId> firstParent = commit.parentN(0);
        if (!firstParent.isPresent()) {
            return Optional.absent();
        }
        return resolveAncestor(firstParent.get(), ancestorN - 1);
    }
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

         */
        @Override
        protected RevCommit computeNext() {
            if (nextCommitId.isPresent()) {
                RevCommit commit = repo.getCommit(nextCommitId.get());
                nextCommitId = commit.parentN(0);
                if (nextCommitId.isPresent() && !repo.commitExists(nextCommitId.get())) {
                    nextCommitId = Optional.absent();
                }
                return commit;
            }
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

            commit = commitOp.setPathFilters(pathFilters)
                    .setProgressListener(cli.getProgressListener()).call();
        } catch (NothingToCommitException noChanges) {
            throw new CommandFailedException(noChanges.getMessage(), noChanges);
        }
        final ObjectId parentId = commit.parentN(0).or(ObjectId.NULL);

        console.println("[" + commit.getId() + "] " + commit.getMessage());

        console.print("Committed, counting objects...");
        Iterator<DiffEntry> diff = geogig.command(DiffOp.class).setOldVersion(parentId)
View Full Code Here

Examples of org.locationtech.geogig.api.RevCommit.parentN()

                    || e instanceof IllegalStateException) {
                throw new CommandFailedException(e.getMessage(), e);
            }
            throw e;
        }
        final ObjectId parentId = commit.parentN(0).or(ObjectId.NULL);

        console.println("[" + commit.getId() + "] " + commit.getMessage());

        console.print("Committed, counting objects...");
        Iterator<DiffEntry> diff = geogig.command(DiffOp.class).setOldVersion(parentId)
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.