# HG changeset patch # User Martin von Zweigbergk # Date 1531422680 25200 # Node ID 94a4980695f801b62b0af4fa576230a6170d1c0e # Parent a3af500a1362ff061f1f5ef2e4814478b8b6738a rebase: skip extinct revisions even if it has no successor in rebase set Differential Revision: https://phab.mercurial-scm.org/D4408 diff -r a3af500a1362 -r 94a4980695f8 hgext/rebase.py --- a/hgext/rebase.py Wed Jul 11 12:26:44 2018 -0700 +++ b/hgext/rebase.py Thu Jul 12 12:11:20 2018 -0700 @@ -1891,7 +1891,7 @@ # If 'srcrev' has a successor in rebase set but none in # destination (which would be catched above), we shall skip it # and its descendants to avoid divergence. - if any(s in destmap for s in succrevs): + if srcrev in extinctrevs or any(s in destmap for s in succrevs): obsoletewithoutsuccessorindestination.add(srcrev) return ( diff -r a3af500a1362 -r 94a4980695f8 tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t Wed Jul 11 12:26:44 2018 -0700 +++ b/tests/test-rebase-obsolete.t Thu Jul 12 12:11:20 2018 -0700 @@ -1525,11 +1525,9 @@ > A > EOF -TODO: There doesn't seem to be much reason to fail this rebase. Make it pass? $ hg rebase -d D -s B - abort: this rebase will cause divergences from: 26805aba1e60 - (to force the rebase please set experimental.evolution.allowdivergence=True) - [255] + rebasing 1:112478962961 "B" (B) + note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence $ cd ..