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

login
register
mail settings
Submitter phabricator
Date March 24, 2021, 6:25 a.m.
Message ID <differential-rev-PHID-DREV-uqp4bfs25caum47p3e6j-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48572/
State Superseded
Headers show

Comments

phabricator - March 24, 2021, 6:25 a.m.
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




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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()'))