Love this. Super nice.
One of the little bits of Mercurial that I appreciate is that it saves backup bundles of the repository state between potentially hairy operations like rebasing and history editing. Seems like the most straightforward approach to the problem.
(It’s possible that this isn’t default behavior—my hg config is mostly whatever ./mach mercurial-setup from the Mozilla tooling installs.)