logFacility.dump(getClass(), Warn, "Bad data sink when reading revision %d. Reported %d bytes consumed, byt actually read %d", revisionNumber, consumed, buf.position());
}
if (buf.position() == 0) {
throw new HgInvalidStateException("Bad sink implementation (consumes no bytes) results in endless loop");
}
buf.compact(); // ensure (a) there's space for new (b) data starts at 0
progressSupport.worked(consumed);
}
progressSupport.done(); // XXX shall specify whether #done() is invoked always or only if completed successfully.
} catch (IOException ex) {
recordFailure(ex);