[PATCH] rebase: remove visibility blockers prior to clearrebase

Durham Goode durham at fb.com
Mon May 4 20:19:25 UTC 2015


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1428359539 25200
#      Mon Apr 06 15:32:19 2015 -0700
# Node ID 0f3e65408c6bd740982c0fe36a97c921a5a39de4
# Parent  e5b507efb36e2b9ad8edb1a38459d26c934d74dd
rebase: remove visibility blockers prior to clearrebase

Rebase sets up visibility blockers at the beginning to keep the rebase sources
alive for the duration of the rebase.  It didn't remove the blockers until after
everything was complete. This breaks evolve's inhibit extension because it is
unable to properly cleanup the old source commits during clearrebase() since the
blockers are keeping it alive.

Let's go ahead and remove the blockers prior to clearrebase being called, so it
can clean up correctly.

The reason there is no corresponding _clearrebasesetvisibility line deletion, is
because it previously happened inside clearstatus() which we still need to call
for its other side effects.

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -478,6 +478,8 @@ def rebase(ui, repo, **opts):
             ui.note(_("update back to initial working directory parent\n"))
             hg.updaterepo(repo, newwd, False)
 
+        # Clear rebase visibility blockers so clearrebase can hide the nodes
+        _clearrebasesetvisibiliy(repo)
         if not keepf:
             collapsedas = None
             if collapsef:


More information about the Mercurial-devel mailing list