This is an archive of the discontinued Mercurial Phabricator instance.

revlog: use proper version comparison during verify
ClosedPublic

Authored by indygreg on Sep 24 2018, 12:12 PM.

Details

Summary

Verify appears to want to compare the changelog's revlog version
number with the version number of filelogs and error if they are
different. But what it was actually doing was comparing the full
32-bit header integer, which contains 2 shorts: 1 for the revlog
version number and 1 for feature flags.

This commit tweaks the verification code so it only looks at the
version number component of the header and emits a warning if they
differ.

The new code is more robust because it accounts for future revlog
version numbers without them needing to be special cased.

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

indygreg created this revision.Sep 24 2018, 12:12 PM
This revision was automatically updated to reflect the committed changes.