# HG changeset patch # User Martin von Zweigbergk # Date 2021-03-23 21:49:31 # Node ID c2438f2f635c4b0b486a76fdbfecbfc2c22528b5 # Parent 535de0e34a797f9b188ff5c5d652f96a70d65c2c rebase: set `prepared = True` at very end of `_preparenewrebase()` 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. Differential Revision: https://phab.mercurial-scm.org/D10257 diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -447,11 +447,11 @@ class rebaseruntime(object): 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 @@ def _compute_obsolete_sets(repo, rebaseo 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()'))