history.setProperty(Page.DATE, now);
history.setProperty(Page.UPDATE, p.isUpdate());
history.setProperty(Page.USER, identity);
// create the diff
diff_match_patch dmp = new diff_match_patch();
// create the diff
LinkedList<Diff> diffs = dmp.diff_main(oldPage.getContent(),
p.getContent());
// make the diff human readable
dmp.diff_cleanupSemantic(diffs);
// convert the diff to html
String diff = dmp.diff_prettyHtml(diffs);
history.setProperty(Page.DIFF, new Text(diff));
datastore.put(history);
}