rebase: only clear rebase status after the rebase transaction has completed
authorLaurent Charignon <lcharignon@fb.com>
Thu, 03 Dec 2015 08:31:20 -0800
changeset 27229 40a2f972f26d
parent 27225 30a20167ae29
child 27230 9f8b8c4e5076
rebase: only clear rebase status after the rebase transaction has completed In 405320cd6198, I made the mistake of moving the step "clearing the status after a rebase" to inside the rebase transaction. This was wrong, since we don't want to clear the status (and the rebase state) if something went wrong during the transaction: if something goes wrong we want to keep the rebase state to be able to abort. It broke rebase with evolve + inhibit.
hgext/rebase.py
--- a/hgext/rebase.py	Thu Dec 03 21:25:05 2015 -0800
+++ b/hgext/rebase.py	Thu Dec 03 08:31:20 2015 -0800
@@ -563,10 +563,10 @@
                 if activebookmark not in repo._bookmarks:
                     # active bookmark was divergent one and has been deleted
                     activebookmark = None
-            clearstatus(repo)
             tr.close()
         finally:
             release(tr)
+        clearstatus(repo)
 
         ui.note(_("rebase completed\n"))
         util.unlinkpath(repo.sjoin('undo'), ignoremissing=True)