* @throws Exception
*/
protected boolean saveAndSetHeadRevision() throws Exception {
boolean success = true;
HeadMongo headMongo = new SaveAndSetHeadRevisionQuery(mongoConnection, this.headMongo.getHeadRevisionId(),
HeadMongo.toDBRepresentation(revisionId)).execute();
if (headMongo == null) {
// TODO: Check for conflicts!
logger.warn(String
.format("Encounterd a conflicting update, thus can't commit revision %s and will be retried with new revision",