This is an archive of the discontinued Mercurial Phabricator instance.

mergestate: replace `addmergedother()` with generic `addcommitinfo()` (API)
ClosedPublic

Authored by pulkit on Aug 10 2020, 7:18 AM.

Details

Summary

Storing that a file is resolved for the other parent while merging is just one
case of things we will like to store in the mergestate. There are more which we
will like to store.

This patch replaces addmergedother() with a much more generic
addcommitinfo(). Doing this, we also blinding stores the same key value pair
generated by the merge code instead of touching them.

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.Aug 10 2020, 7:18 AM
marmoute requested changes to this revision.Aug 10 2020, 1:22 PM
marmoute added a subscriber: marmoute.

This seems to conflict with my request for D8921, do we have a good way forward that allow to still rename the key ?

This revision now requires changes to proceed.Aug 10 2020, 1:22 PM
pulkit updated this revision to Diff 22395.Aug 11 2020, 3:47 AM

This seems to conflict with my request for D8921, do we have a good way forward that allow to still rename the key ?

Updated the previous patches and renamed the key. My further plan is to start storing filenodes in _stateextras of mergestate. However we will need to keep the current {b'filenode-source': b'other'} trick in place because old versions don't store the filenode.

indygreg accepted this revision.Aug 22 2020, 6:50 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.