return;
}
Patch p = GeneratePatchInspector.delta(prevContent, nextContent);
prevContent = nextContent;
nextContent = null;
PatchDataSource pds = p.new PatchDataSource();
int len = pds.serializeLength() + 84;
ds.writeInt(len);
ds.write(nodeid, 0, Nodeid.SIZE);
if (parent1Revision != NO_REVISION) {
ds.writeByte(parentMap.get(parent1Revision).toByteArray());
} else {
ds.writeByte(Nodeid.NULL.toByteArray());
}
if (parent2Revision != NO_REVISION) {
ds.writeByte(parentMap.get(parent2Revision).toByteArray());
} else {
ds.writeByte(Nodeid.NULL.toByteArray());
}
ds.writeByte(clogMap.get(linkRevision).toByteArray());
pds.serialize(ds);
} catch (IOException ex) {
// XXX odd to have object with IOException to use where no checked exception is allowed
throw new HgInvalidControlFileException(ex.getMessage(), ex, null);
} catch (HgIOException ex) {
throw new HgInvalidControlFileException(ex, true); // XXX any way to refactor ChunkGenerator not to get checked exception here?