comparison hgext/rebase.py @ 46835:c2438f2f635c

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 23 Mar 2021 14:49:31 -0700
parents 535de0e34a79
children 80cac9936324
comparison
equal deleted inserted replaced
46834:535de0e34a79 46835:c2438f2f635c
445 for destrev in sorted(set(destmap.values())): 445 for destrev in sorted(set(destmap.values())):
446 dest = self.repo[destrev] 446 dest = self.repo[destrev]
447 if dest.closesbranch() and not self.keepbranchesf: 447 if dest.closesbranch() and not self.keepbranchesf:
448 self.ui.status(_(b'reopening closed branch head %s\n') % dest) 448 self.ui.status(_(b'reopening closed branch head %s\n') % dest)
449 449
450 self.prepared = True
451
452 # Calculate self.obsolete_* sets 450 # Calculate self.obsolete_* sets
453 self._handleskippingobsolete() 451 self._handleskippingobsolete()
452
453 self.prepared = True
454 454
455 def _assignworkingcopy(self): 455 def _assignworkingcopy(self):
456 if self.inmemory: 456 if self.inmemory:
457 from mercurial.context import overlayworkingctx 457 from mercurial.context import overlayworkingctx
458 458
2190 without a successor in destination, that would cause divergence. 2190 without a successor in destination, that would cause divergence.
2191 """ 2191 """
2192 obsolete_with_successor_in_destination = {} 2192 obsolete_with_successor_in_destination = {}
2193 obsolete_with_successor_in_rebase_set = set() 2193 obsolete_with_successor_in_rebase_set = set()
2194 2194
2195 assert repo.filtername is None
2196 cl = repo.changelog 2195 cl = repo.changelog
2197 get_rev = cl.index.get_rev 2196 get_rev = cl.index.get_rev
2198 extinctrevs = set(repo.revs(b'extinct()')) 2197 extinctrevs = set(repo.revs(b'extinct()'))
2199 for srcrev in rebaseobsrevs: 2198 for srcrev in rebaseobsrevs:
2200 srcnode = cl.node(srcrev) 2199 srcnode = cl.node(srcrev)