We already skip obsolete revisions in some case: if there is no
successor, or when the successor is in the rebase set or in the
destination, I think. However, we instead error out if the successor
is elsewhere (e.g. a child or a sibling of the destination), because
it would cause divergence. The previous commit fixed one specific case
Consider this history (based on a test case updated by this patch):
o D | | o B' |/ | o C | | | x B |/ o A
If the user now runs hg rebase -s B -d D we would error out and tell
them that it would cause divergence from B. This patch makes it so we
instead ignore B and C (and tell the user that we're doing that
because it would cause divergence). I think this simpler model will be
easier for users to understand (I had also thought that all obsolete
commits and their descendants were skipped until we got reports from
users that that wasn't the case).
Note that we still skip just the obsolete (not its descendants) if
it's a prune or if the successor is in the destination.
This should also let us simplify the source quite a bit. I'll do that
in later commits after I've heard people's thoughts on this one.