This is an archive of the discontinued Mercurial Phabricator instance.

reabase: call rewriteutil.precheck() a bit later
ClosedPublic

Authored by martinvonz on Mar 24 2021, 2:25 AM.

Details

Summary

We now filter out descendants of divergence-causing commits in
_handleskippingobsolete(). The filtered-out commits are removed from
the rebase set (destmap and state). We should therefore call
rewriteutil.precheck() after _handleskippingobsolete(). This patch
does that. It hasn't mattered so far because rewriteutil.precheck()
doesn't yet check for divergence, but it will soon.

This affects one test where we now fail because the user is trying to
rebase an ancestor instead of failing because they tried to rebase a
public commit. We have several similar tests just after, where we
still fail because of the phase, so that seems fine. The difference in
behavior also seems fine to me.

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

martinvonz created this revision.Mar 24 2021, 2:25 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.