diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -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 --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t --- a/tests/test-rebase-obsolete.t +++ b/tests/test-rebase-obsolete.t @@ -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 ..