Releases every retained revert and makes the current document a new history root. Fails while a command is pending or a step is open.