Calculate and repair shapes with Shapely.
Recent revisions are kept. Restoring one creates a new revision.