This is an archive of the discontinued Mercurial Phabricator instance.

discovery: port _postprocessobsolete() changes from evolve, add tests
ClosedPublic

Authored by av6 on Jan 28 2022, 12:39 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

av6 created this revision.Jan 28 2022, 12:39 PM
marmoute accepted this revision.Jan 31 2022, 12:01 PM
marmoute added a subscriber: marmoute.
marmoute added inline comments.
mercurial/discovery.py
550

nits: this can be future_non_obsolete now

Alphare accepted this revision.Feb 3 2022, 11:31 AM
Alphare added a subscriber: Alphare.

The fancy unicode graphs are a nice touch ;)

This revision is now accepted and ready to land.Feb 3 2022, 11:31 AM