}));
// rev6 changes rev4, rev4 changes rev3. Plus, anything changed
// earlier than rev2 shall be reported as new from change3
int[] change_2_8_new2old = new int[] {4, 6, 3, 4, -1, 3};
int[] change_2_8_old2new = new int[] {-1, 3, 3, 4, 4, 6 };
final HgDiffCommand cmd = new HgDiffCommand(repo);
cmd.file(df);
cmd.range(2, 8).order(NewToOld);
cmd.executeAnnotate(insp);
Assert.assertArrayEquals(change_2_8_new2old, insp.getReportedRevisionPairs());
insp.reset();
cmd.order(OldToNew).executeAnnotate(insp);
Assert.assertArrayEquals(change_2_8_old2new, insp.getReportedRevisionPairs());
// same as 2 to 8, with addition of rev9 changes rev7 (rev6 to rev7 didn't change content, only name)
int[] change_3_9_new2old = new int[] {7, 9, 4, 6, 3, 4, -1, 3 };
int[] change_3_9_old2new = new int[] {-1, 3, 3, 4, 4, 6, 7, 9 };
insp.reset();
cmd.range(3, 9).order(NewToOld).executeAnnotate(insp);
Assert.assertArrayEquals(change_3_9_new2old, insp.getReportedRevisionPairs());
insp.reset();
cmd.order(OldToNew).executeAnnotate(insp);
Assert.assertArrayEquals(change_3_9_old2new, insp.getReportedRevisionPairs());
}