This is an archive of the discontinued Mercurial Phabricator instance.

revlog: fix wrong type of rank_unknown variable
ClosedPublic

Authored by jcristau on Mar 14 2022, 1:00 PM.

Details

Summary

We treat "rank" as an int everywhere, but declare rank_unknown as a
char. On architectures where char is signed, that works out ok, but
when char is unsigned, rank_unknown is 255 instead of -1.

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 14 2022, 1:00 PM
pacien accepted this revision.Mar 14 2022, 1:15 PM
pacien added a subscriber: pacien.

Resolves failure of test-parseindex2 on aarch64-linux for me on NixOS.
Thanks!

Alphare accepted this revision.Mar 15 2022, 4:25 AM
Alphare added a subscriber: Alphare.

Thanks!

This revision is now accepted and ready to land.Mar 15 2022, 4:25 AM
This revision was automatically updated to reflect the committed changes.