public Void call() throws Exception {
LOGGER.debug("Upgrading repository '{0}'", name);
lastUpgradeId = upgrades.applyUpgradesSince(lastUpgradeId, resources);
LOGGER.debug("Recording upgrade completion in repository '{0}'", name);
LocalDocumentStore store = documentStore().localStore();
store.prepareDocumentsForUpdate(Collections.unmodifiableSet(REPOSITORY_INFO_KEY));
EditableDocument editor = store.edit(REPOSITORY_INFO_KEY, true);
DateTime now = context().getValueFactories().getDateFactory().create();
editor.setDate(REPOSITORY_UPGRADED_AT_FIELD_NAME, now.toDate());
editor.setNumber(REPOSITORY_UPGRADE_ID_FIELD_NAME, lastUpgradeId);
editor.remove(REPOSITORY_UPGRADER_FIELD_NAME);
return null;