D7824: tests: add test of rebase with conflict in merge commit

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Jan 13 13:16:11 EST 2020

martinvonz added inline comments.


> pulkit wrote in test-rebase-conflicts.t:460
> I think it will be weird to have current parents as 7 and 8. Rebase copies commit, so if there is a merge commit, it copies it instead of recreating one. Also if we have 7 and 8 as parents, we might not have correct conflicts.

I made more arguments for changing it in the next patch (D7827 <https://phab.mercurial-scm.org/D7827>). See if those can convince you :)

I'm not sure what you mean about not having correct conflicts. Related to that, I think it's actually weird (with how it's currently done) how you would not see any changes made between the merge base and the rebase base. So if there had been commits between `A` and `C` here and we were rebasing from `C`, we would not see those changes in the working copy. That's of course correct, but the dirstate's two parents suggest, IMO, that we're merging the two commits, so we should see those changes.

I can see the value in having the thing you're grafting in as a working copy parent because it makes it appear in the `hg log` output as a reminder. However, I don't think that's what the purpose of the dirstate parent should be. We could perhaps add another  mechanism for showing the commit that's being rebased, and maybe also the base (which is generally not the merge base).

  rHG Mercurial



To: martinvonz, #hg-reviewers
Cc: pulkit, mercurial-devel

More information about the Mercurial-devel mailing list