D10259: rebase: don't call rewriteutil.precheck() with to-be-skipped commits
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Mar 24 06:25:41 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10259
AFFECTED FILES
hgext/rebase.py
CHANGE DETAILS
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -441,8 +441,10 @@
# Calculate self.obsolete_* sets
self._handleskippingobsolete()
- rebaseset = destmap.keys()
if not self.keepf:
+ rebaseset = 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:
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list