( )⚙ D10978 dirstate: no longer pass `oldstate` to the `dropfile`

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: no longer pass `oldstate` to the `dropfile`
ClosedPublic

Authored by marmoute on Jul 4 2021, 5:52 PM.

Details

Summary

The oldstate value come literally from _map so we don't need to pass tha
information along.

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

marmoute created this revision.Jul 4 2021, 5:52 PM
SimonSapin accepted this revision.Jul 5 2021, 1:26 AM
SimonSapin added a subscriber: SimonSapin.
SimonSapin added inline comments.
mercurial/dirstatemap.py
244–245

Nit: these two lines would be clearer to me in an else

marmoute added inline comments.Jul 5 2021, 4:47 AM
mercurial/dirstatemap.py
244–245

I don't disagree, but the "pre-assign the default case" have been the policy in the codebase. (Hoever, we could decide to change mpm era policy)

baymax updated this revision to Diff 28880.Jul 6 2021, 2:09 PM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

pulkit accepted this revision.Jul 6 2021, 3:11 PM
This revision is now accepted and ready to land.Jul 6 2021, 3:11 PM
This revision was automatically updated to reflect the committed changes.