( )⚙ D8098 rust-nodemap: a method for full invalidation

This is an archive of the discontinued Mercurial Phabricator instance.

rust-nodemap: a method for full invalidation
ClosedPublic

Authored by marmoute on Feb 8 2020, 12:45 PM.

Details

Summary

This will be used for exceptional operations,
such as a __delitem__ on the MixedIndex with
Rust nodemap.

In principle, NodeTree should also be able to forget
an entry in an efficient way, by accepting to insert
Element::None instead of only Element::Rev(r),
but that seems really overkill at this point. We need
to support exceptional operations such as __delitem__,
only for completeness of the revlog index as seen from
Python. The Python callers don't seem to even really
need it, deciding to drop the nodemap inconditionnally at
at higher level when calling hg strip. Also, hg strip
is very costly for reasons that are unrelated to nodemap
aspects.

Diff Detail

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

Event Timeline

marmoute created this revision.Feb 8 2020, 12:45 PM
Alphare updated this revision to Diff 20220.Feb 14 2020, 6:02 AM
Alphare updated this revision to Diff 20239.Feb 15 2020, 6:50 AM
Alphare updated this revision to Diff 20280.Feb 24 2020, 5:13 AM
kevincox accepted this revision.Feb 24 2020, 5:56 AM
kevincox added inline comments.
rust/hg-core/src/revlog/nodemap.rs
558

-> () is unnecessary.

561

End the line with a ;.

Alphare updated this revision to Diff 20285.Feb 24 2020, 8:15 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.