Bring context-mode up to date and fix its hooks.
Recent revisions are kept. Restoring one creates a new revision.