This is an archive of the discontinued Mercurial Phabricator instance.

dirstate: move most of the `remove` logic with dirstatemap `removefile`
ClosedPublic

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

Details

Summary

This code deal with special logic to preserving "merged" and "from_p2" information when removing a file. These are implementation details that are more suitable for the dirstatemap layer. Since the dirstatemap layer alreaday have most of the information necessary to do so, the move is easy.

This move helps us to encapsulate more implementation details within the dirstatemap and its entry. Easing the use of a different storage for dirstate v2.

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:50 PM
SimonSapin accepted this revision.Jul 5 2021, 12:12 AM
SimonSapin added a subscriber: SimonSapin.
SimonSapin added inline comments.
rust/hg-cpython/src/dirstate/dirstate_map.rs
145

No need to go back and change it here, but I think rust-cpython supports specifying a PyBool or even bool type directly in the method signature, and takes of the conversion in that case

pulkit accepted this revision.Jul 6 2021, 12:24 PM
This revision is now accepted and ready to land.Jul 6 2021, 12:24 PM
baymax updated this revision to Diff 28855.Jul 6 2021, 2:08 PM

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