throw new IllegalArgumentException();
}
if (mediator.busy()) {
throw new ConcurrentModificationException();
}
HgStatusCollector sc = new HgStatusCollector(repo); // TODO from CommandContext
// PathPool pathHelper = new PathPool(repo.getPathHelper()); // TODO from CommandContext
try {
// XXX if I need a rough estimation (for ProgressMonitor) of number of work units,
// I may use number of files in either rev1 or rev2 manifest edition
mediator.start(statusHandler, getCancelSupport(statusHandler, true), new ChangelogHelper(repo, startRevision));
if (endRevision == WORKING_COPY) {
HgWorkingCopyStatusCollector wcsc = scope != null ? HgWorkingCopyStatusCollector.create(repo, scope) : new HgWorkingCopyStatusCollector(repo);
wcsc.setBaseRevisionCollector(sc);
wcsc.walk(startRevision, mediator);
} else {
sc.setScope(scope); // explicitly set, even if null - would be handy once we reuse StatusCollector
if (startRevision == TIP) {
sc.change(endRevision, mediator);
} else {
sc.walk(startRevision, endRevision, mediator);
}
}
mediator.checkFailure();
} catch (HgRuntimeException ex) {
throw new HgLibraryFailureException(ex);