This is an archive of the discontinued Mercurial Phabricator instance.

rust-dirstatemap: add `set_untracked` method
ClosedPublic

Authored by Alphare on Apr 6 2022, 10:11 AM.

Details

Summary

This is the new API that Python has already migrated to

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

Alphare created this revision.Apr 6 2022, 10:11 AM
marmoute added inline comments.
rust/hg-core/src/dirstate_tree/dirstate_map.rs
782

If we know that an entry exist. why do we need a get_or_insert here?

792–794

Code lower in this patch seems to drop the node in the "added" case, how does this deal with the fact we keep touching it here ?

Alphare added inline comments.Apr 8 2022, 9:08 AM
rust/hg-core/src/dirstate_tree/dirstate_map.rs
782

See D12458. We've agreed to fix this in additional patches to reduce churn.

792–794

This is not called at all in the "added" case.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
baymax updated this revision to Diff 32932.Apr 8 2022, 12:29 PM

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

baymax updated this revision to Diff 33034.Apr 12 2022, 10:58 AM

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

baymax updated this revision to Diff 33116.Apr 12 2022, 12:06 PM

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