Mercurial > hg
changeset 46837:27ba8acd5684
rebase: don't call rewriteutil.precheck() with to-be-skipped commits
It's clearly incorrect to call `rewriteutil.precheck()` for commits
that we're not about to rewrite. We haven't noticed yet because the
function doesn't check for divergence, but I'm about to teach it to do
that.
Differential Revision: https://phab.mercurial-scm.org/D10259
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 23 Mar 2021 22:48:27 -0700 |
parents | 80cac9936324 |
children | d083c12032c6 |
files | hgext/rebase.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Mar 23 14:15:40 2021 -0700 +++ b/hgext/rebase.py Tue Mar 23 22:48:27 2021 -0700 @@ -441,8 +441,10 @@ # Calculate self.obsolete_* sets self._handleskippingobsolete() - rebaseset = destmap.keys() if not self.keepf: + rebaseset = set(destmap.keys()) + rebaseset -= set(self.obsolete_with_successor_in_destination) + rebaseset -= self.obsolete_with_successor_in_rebase_set try: rewriteutil.precheck(self.repo, rebaseset, action=b'rebase') except error.Abort as e: