D10257: rebase: set `prepared = True` at very end of `_preparenewrebase()`

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

D10257: rebase: set `prepared = True` at very end of `_preparenewrebase()`

marmoute (Pierre-Yves David)
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Once we've set `rebaseruntime.prepared = True`, `rebaseruntime.repo`
  starts returning the unfiltered repo. That will make my next patch
  break, because that patch moves the call to `rewriteutil.precheck()`
  after the call to `_handleskippingobsolete()`, which current happens
  after `prepared = True`. We therefore need to prepare by moving
  `prepared = True` a bit later, after `_handleskippingobsolete()`. I
  don't think that matters for that call.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10257

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -447,11 +447,11 @@
             if dest.closesbranch() and not self.keepbranchesf:
                 self.ui.status(_(b'reopening closed branch head %s\n') % dest)
 
-        self.prepared = True
-
         # Calculate self.obsolete_* sets
         self._handleskippingobsolete()
 
+        self.prepared = True
+
     def _assignworkingcopy(self):
         if self.inmemory:
             from mercurial.context import overlayworkingctx
@@ -2192,7 +2192,6 @@
     obsolete_with_successor_in_destination = {}
     obsolete_with_successor_in_rebase_set = set()
 
-    assert repo.filtername is None
     cl = repo.changelog
     get_rev = cl.index.get_rev
     extinctrevs = set(repo.revs(b'extinct()'))



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel