This is an archive of the discontinued Mercurial Phabricator instance.

rebase: always be graft-like, not merge-like, also for merges
ClosedPublic

Authored by martinvonz on Jan 16 2020, 3:10 AM.

Details

Summary

Rebase works by updating to a commit and then grafting changes on
top. However, before this patch, it would actually merge in changes
instead of grafting them in in some cases. That is, it would use the
common ancestor as base instead of using one of the parents. That
seems wrong to me, so I'm changing it so defineparents() always
returns a value for base.

This fixes the bad behavior in test-rebase-newancestor.t, which was
introduced in 65f215ea3e8e (tests: add test for rebasing merges with
ancestors of the rebase destination, 2014-11-30).

The difference in test-rebase-dest.t is because the files in the tip
revision were A, D, E, F before this patch and A, D, F, G after it. I
think both files should ideally be there.

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.Jan 16 2020, 3:10 AM
martinvonz updated this revision to Diff 19377.Jan 16 2020, 1:23 PM

Reviewers: This patch is independent of D7827, so please don't let that patch block this one.

martinvonz updated this revision to Diff 19699.Jan 29 2020, 7:56 PM
martinvonz updated this revision to Diff 19858.Feb 3 2020, 1:08 PM
martinvonz updated this revision to Diff 20093.Feb 10 2020, 7:22 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.