Page MenuHomePhabricator

rebase: allow rebasing obsolete commit without successor
Needs ReviewPublic

Authored by martinvonz on Oct 25 2019, 8:48 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

When trying to rebase an obsolete whose successors are also all
obsolete, we would skip it and tell the user that it would have caused
divergence. That is not correct. We could just change the message, but
I don't see any harm in rebasing such commits. It even seems like a
reasonable way to make it not obsolete. So this patch makes that type
of rebase allowed.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Oct 25 2019, 8:48 PM

That is not necessarly True, If the changeset is pruned, but successors of a public changeset, rebasing it would create phase-divergence. @khanchi97 fixed similar cases in September.

Overall, we should migrate the rebase code to use the precheck logic in rewrite util (and make sure things are well covered there).

One can read more about current Sushil work in this area here: https://www.mercurial-scm.org/wiki/CEDPrecheckPlan.