Mercurial > hg-stable
changeset 46832:d95edcbe5c99
rebase: calculate obsolescense-related info earlier
My goal is to use `rewriteutil.precheck()` in the rebase code. Since
rebase does its own handling of divergent commits (it skips them
instead of erroring out), we need to have divergence-causing commits
filtered out early. This patch helps prepare for that.
Differential Revision: https://phab.mercurial-scm.org/D10247
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 12 Feb 2021 16:05:02 -0800 |
parents | 7d80622fc212 |
children | 47c251a14525 |
files | hgext/rebase.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Feb 12 16:19:33 2021 -0800 +++ b/hgext/rebase.py Fri Feb 12 16:05:02 2021 -0800 @@ -368,6 +368,8 @@ self.resume = True try: self.restorestatus() + # Calculate self.obsoletenotrebased + self._handleskippingobsolete() self.collapsemsg = restorecollapsemsg(self.repo, isabort) except error.RepoLookupError: if isabort: @@ -434,6 +436,9 @@ self.prepared = True + # Calculate self.obsoletenotrebased + self._handleskippingobsolete() + def _assignworkingcopy(self): if self.inmemory: from mercurial.context import overlayworkingctx @@ -467,9 +472,6 @@ _(b'cannot collapse multiple named branches') ) - # Calculate self.obsoletenotrebased - self._handleskippingobsolete() - # Keep track of the active bookmarks in order to reset them later self.activebookmark = self.activebookmark or repo._activebookmark if self.activebookmark: