( )⚙ D10972 dirstate: drop `state` to `_addpath`

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: drop `state` to `_addpath`
ClosedPublic

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

Details

Summary

All its value are inferred within the dirstatemap now.

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:51 PM
SimonSapin accepted this revision.Jul 5 2021, 1:08 AM
SimonSapin added a subscriber: SimonSapin.
SimonSapin added inline comments.
rust/hg-cpython/src/dirstate/dirstate_map.rs
140–142

This strongly suggests that DirstateMapMethods::add_file should no longer take a DirstateEntry parameter. Let’s refactor that later together with its boolean parameters.

marmoute added inline comments.Jul 5 2021, 4:43 AM
rust/hg-cpython/src/dirstate/dirstate_map.rs
140–142

Yep, we can build something better dirstatemap side and that should lead use to something simpler on the hg-core side too.

pulkit added a subscriber: pulkit.Jul 6 2021, 12:47 PM
pulkit added inline comments.
mercurial/dirstatemap.py
184

Hm, is this an intended change?

marmoute added inline comments.Jul 6 2021, 12:52 PM
mercurial/dirstatemap.py
184

Yes, since we dropped the argument we still need it defined in all code path. That code path is the the 'n' case.

rust/hg-core/src/dirstate/dirstate_map.rs
102

See the similar change in the rust code.

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

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

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