This is an archive of the discontinued Mercurial Phabricator instance.

revlog: access the nodemap through the index
ClosedPublic

Authored by marmoute on Nov 8 2019, 4:29 AM.

Details

Summary

The revlog.rev method now access the nodemap through self.index.nodemap,
instead of using the _nodecache attribute that we are trying to remove.

This work is part of a refactoring to unify the revlog index and the nodemap.
This unification prepare the use of a persistent nodemap.

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.Nov 8 2019, 4:29 AM
indygreg accepted this revision.Nov 8 2019, 2:34 PM

Note that this adds an extra lookup to calls to rev(), which is often used in tight loops. But I think things may be fine. And we can always reintroduce the property if it shows up in perf tests.

This revision is now accepted and ready to land.Nov 8 2019, 2:34 PM
This revision was automatically updated to reflect the committed changes.