diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -204,6 +204,7 @@ self.keepbranchesf = opts.get(b'keepbranches', False) self.obsoletenotrebased = {} self.obsoletewithoutsuccessorindestination = set() + self.obsoleteextinctsuccessors = set() self.inmemory = inmemory self.stateobj = statemod.cmdstate(repo, b'rebasestate') @@ -357,11 +358,11 @@ ( self.obsoletenotrebased, self.obsoletewithoutsuccessorindestination, - obsoleteextinctsuccessors, + self.obsoleteextinctsuccessors, ) = _computeobsoletenotrebased(self.repo, obsoleteset, destmap) skippedset = set(self.obsoletenotrebased) skippedset.update(self.obsoletewithoutsuccessorindestination) - skippedset.update(obsoleteextinctsuccessors) + skippedset.update(self.obsoleteextinctsuccessors) _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset) def _prepareabortorcontinue(self, isabort, backup=True, suppwarns=False): @@ -576,6 +577,7 @@ elif ( not allowdivergence and rev in self.obsoletewithoutsuccessorindestination + and rev not in self.obsoleteextinctsuccessors ): msg = ( _( 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 @@ -1538,9 +1538,8 @@ 1 new obsolescence markers obsoleted 1 changesets $ hg tag --local --remove E -BROKEN: this rebase would not cause divergence $ hg rebase -d D -s C - note: not rebasing 3:26805aba1e60 "C" (C) and its descendants as this would cause divergence + rebasing 3:26805aba1e60 "C" (C) $ cd ..