Patchwork rebase: remove visibility blockers prior to clearrebase

login
register
mail settings
Submitter Durham Goode
Date May 4, 2015, 8:19 p.m.
Message ID <0f3e65408c6bd740982c.1430770765@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8877/
State Rejected
Delegated to: Pierre-Yves David
Headers show

Comments

Durham Goode - May 4, 2015, 8:19 p.m.
# HG changeset patch
# User Durham Goode <durham@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.
Pierre-Yves David - May 5, 2015, 12:08 a.m.
On 05/04/2015 01:19 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham@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

I talk with Durham in real life and we agreed to drop this version of 
the patch (that I find a bit too magic).

Instead, he is preparing a patch that wraps markers creation, bookmark 
movements and rebase state cleanup in a transaction.

This has the nice side effect to get one less bookmark movements code 
outside a transaction.

Patch

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: