final int indexSize = revisionCount();
if (indexSize == 0 || sortedRevisions.length == 0) {
return;
}
if (sortedRevisions[0] > indexSize) {
throw new HgInvalidRevisionException(String.format("Can't iterate [%d, %d] in range [0..%d]", sortedRevisions[0], sortedRevisions[sortedRevisions.length - 1], indexSize), null, sortedRevisions[0]);
}
if (sortedRevisions[sortedRevisions.length - 1] > indexSize) {
throw new HgInvalidRevisionException(String.format("Can't iterate [%d, %d] in range [0..%d]", sortedRevisions[0], sortedRevisions[sortedRevisions.length - 1], indexSize), null, sortedRevisions[sortedRevisions.length - 1]);
}
ReaderN1 r = new ReaderN1(needData, inspector, repo.shallMergePatches());
try {
r.start(sortedRevisions.length, getLastRevisionRead());