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
--- 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: