This is an archive of the discontinued Mercurial Phabricator instance.

commit: get info from mergestate whether a file was merged or not
ClosedPublic

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

Details

Summary

While commiting a merge, the commit code does not know whether a file was merged
during hg merge or not. This leads the commit code to look for filelog
ancestor to choose parents of new filelog created on merge commit.
This leads to wrong results in some cases as demonstrated by previous patch.

From this patch, we start storing information about merged files in mergestate
in stateextras and then use that on commit to detect whether we need to set two
parents or not.

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

pulkit created this revision.Mar 10 2021, 4:04 AM
durin42 requested changes to this revision.Mar 17 2021, 1:44 PM

Needs rebased.

This revision now requires changes to proceed.Mar 17 2021, 1:44 PM
pulkit updated this revision to Diff 26516.Mar 19 2021, 4:36 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.