( )⚙ D8876 merge: pass mergeresult obj instead of actions in applyupdates() (API)

This is an archive of the discontinued Mercurial Phabricator instance.

merge: pass mergeresult obj instead of actions in applyupdates() (API)
ClosedPublic

Authored by pulkit on Aug 5 2020, 4:51 AM.

Details

Summary

This is similar to past 20 patches or so where we are replacing use of a bare
actions dict with a dedicated mergeresult object. The goal is to have a
dedicated powerful object instead of a dict while making the code more easier to
understand.
In past few patches, we have already simplified the code at some places using
the newly introduced object.

This patch does not updates applyupdates() to use the mergeresult object
directly. That will be done in next patch to make things easier to review.

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 5 2020, 4:51 AM
indygreg accepted this revision.Aug 8 2020, 12:12 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/sparse.py
278

Shouldn't we be using the constant for r here? But this appeared in the old code, so not a new issue.

519

More opportunities for constants if you feel so inclined...

This revision is now accepted and ready to land.Aug 8 2020, 12:12 PM