( )⚙ D10147 commit: reorder if-else conditional to give mergestate info priority

This is an archive of the discontinued Mercurial Phabricator instance.

commit: reorder if-else conditional to give mergestate info priority
ClosedPublic

Authored by pulkit on Mar 10 2021, 4:04 AM.

Details

Summary

Looking at the code now, I was unable to find a good reason as why we only rely
on mergestate extras info after checking whether a filelog parent is ancestor of
other or not.

I mean if we have stored in mergestate that other was chosed, we should
blindly pick that one.

This cleanup will also help introduce more cases when both fparent1 and
fparent2 are non-null but using info from mergestate, we can fastpath.

The test change actually demonstrates the point of the patch. During merge we
were getting the other side of the file but on commit we were marking that as
merged.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pulkit created this revision.Mar 10 2021, 4:04 AM
Alphare accepted this revision.Mar 10 2021, 6:41 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.
baymax updated this revision to Diff 26368.Mar 15 2021, 2:10 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)