( )⚙ D8816 merge: introduce hasconflicts() on mergeresult object

This is an archive of the discontinued Mercurial Phabricator instance.

merge: introduce hasconflicts() on mergeresult object
ClosedPublic

Authored by pulkit on Jul 25 2020, 5:59 AM.

Details

Summary

This and upcoming patches will improve the mergeresult object making it more
powerful and provide clean APIs for various things. Doing this will clean up the
core merge code which is present in update() a bit.

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.Jul 25 2020, 5:59 AM
indygreg accepted this revision.Aug 2 2020, 12:53 PM
indygreg added a subscriber: indygreg.
indygreg added inline comments.
mercurial/merge.py
589

This preserves the old logic, so this is a fine refactor. But I don wonder if this should be an explicit inclusion set rather than an exclusion one. The way it is now, if we add an action and forget to update this set, this code could be buggy.

This revision is now accepted and ready to land.Aug 2 2020, 12:53 PM
indygreg added inline comments.Aug 2 2020, 1:14 PM
mercurial/merge.py
587

pyflakes didn't like the shadowing of _ here. So I changed variable names in flight.

This revision was automatically updated to reflect the committed changes.