Finish history rewrite.