public void writeCommitsWithChangeCounts(Iterator<CommitWithChangeCounts> entries,
int elementsPerPage) throws XMLStreamException {
int counter = 0;
while (entries.hasNext() && counter < elementsPerPage) {
CommitWithChangeCounts entry = entries.next();
writeCommit(entry.getCommit(), "commit", entry.getAdds(), entry.getModifies(),
entry.getRemoves());
counter++;
}
if (entries.hasNext()) {