catch (IOException e)
{
throw new RepositoryException("Get successor " + version.getPath() + " error " + e, e);
}
ItemDataRemoveVisitor removeVisitor = new ItemDataRemoveVisitor(dataManager.getTransactManager(), null);
version.getData().accept(removeVisitor);
changes.addAll(removeVisitor.getRemovedStates());
dataManager.getTransactManager().save(changes);
version.invalidate();
}