@NotNull @Override public List<CommitId> getChildren(@NotNull CommitId commit) { int commitIndex = myPermanentCommitsInfo.getNodeId(commit); return myPermanentCommitsInfo.convertToCommitIdList( LinearGraphUtils.getUpNodes(myPermanentLinearGraph, commitIndex)); }
@NotNull @Override public List<GraphCommit<CommitId>> getAllCommits() { List<GraphCommit<CommitId>> result = ContainerUtil.newArrayList(); for (int index = 0; index < myPermanentLinearGraph.nodesCount(); index++) { CommitId commitId = myPermanentCommitsInfo.getCommitId(index); List<Integer> downNodes = LinearGraphUtils.getDownNodesIncludeNotLoad(myPermanentLinearGraph, index); List<CommitId> parentsCommitIds = myPermanentCommitsInfo.convertToCommitIdList(downNodes); GraphCommit<CommitId> graphCommit = new GraphCommitImpl<CommitId>( commitId, parentsCommitIds, myPermanentCommitsInfo.getTimestamp(index)); result.add(graphCommit); } return result; }