This is an archive of the discontinued Mercurial Phabricator instance.

revlog: fix index_fast_rank (wip)
ClosedPublic

Authored by jcristau on Mar 15 2022, 5:38 AM.

Details

Summary

As far as I can tell, rank is stored as a 32-bit big endian value, I'm
not sure how grabbing the first byte can possibly work. I assume
there's no test coverage here?

cc @pacien

Fixes: https://www.mercurial-scm.org/repo/hg/rev/e633e660158f

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

jcristau created this revision.Mar 15 2022, 5:38 AM
baymax updated this revision to Diff 32645.Mar 15 2022, 6:58 AM

โœ… refresh by Heptapod after a successful CI run (๐Ÿ™ ๐Ÿ’š)

FYI I took the liberty to send this to the CI to confirm this either works or is part of code that is not covered. I'll wait for @pacien to answer

Alphare accepted this revision.Mar 17 2022, 5:13 AM

I'll amend the title in-flight. This is covered (at least) by test-rank.t, maybe it "works" because we're only testing on little endian machines and the values never exceed 255?

This revision is now accepted and ready to land.Mar 17 2022, 5:13 AM
pacien accepted this revision.Mar 17 2022, 5:28 AM
This revision was automatically updated to reflect the committed changes.