D10259: rebase: don't call rewriteutil.precheck() with to-be-skipped commits

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

D10259: rebase: don't call rewriteutil.precheck() with to-be-skipped commits

marmoute (Pierre-Yves David)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel