discovery: port _postprocessobsolete() changes from evolve, add tests...
discovery: port _postprocessobsolete() changes from evolve, add tests
Let's make this function obsolescence-aware as well. Now we check that
revisions are not obsolete first, and only then check that they are going to be
common after exchange.
The tests make sure that rewriting changesets doesn't confuse head computation.
They rely on experimental.single-head-per-branch feature to show that remote
correctly sees the expected result (i.e. either aborts the push or allows it to
succeed). They are ported from evolve as well.
Differential Revision:
https://phab.mercurial-scm.org/D12098