This is an archive of the discontinued Mercurial Phabricator instance.

revlog: remove micro-optimization for looking up only nullid
ClosedPublic

Authored by martinvonz on Aug 1 2018, 3:01 PM.

Details

Summary

index_find_node() would call nt_find() before initializing the node
tree. nt_find() would then return -2 unless the requested revision was
the null revision. I can't imagine what scenario that is optimizing
for, and doing the initialization earlier makes the code simpler and
easier to follow, so that's what this patch does.

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

martinvonz created this revision.Aug 1 2018, 3:01 PM
This revision was automatically updated to reflect the committed changes.