( )⚙ D8875 merge: pass mergeresult obj instead of actions in _checkcollision() (API)

This is an archive of the discontinued Mercurial Phabricator instance.

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

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

Details

Summary

The goal is to not use the actions dict and replace it with a rich mergeresult
object.

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:03 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/merge.py
299–302

I initially wrote a comment that mresult is likely always defined but see that None can be passed in. Do you think it makes more sense to pass in an empty merge result instance instead of None? That seems to be the pattern elsewhere in this merge code refactor.

(This could be done as a follow-up, of course.)

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