This is an archive of the discontinued Mercurial Phabricator instance.

upgrade: use rawsize() instead of revlog index
ClosedPublic

Authored by indygreg on Sep 24 2018, 1:15 PM.

Details

Summary

The revlog index is a very low-level data structure and it shouldn't
be exposed to the storage interface - at least not in its current
form.

upgrade.py is the only consumer of the index attribute on file storage
in the repository.

This commit rewrites that final consumer to use rawsize() instead of
going through the index. This is actually the more proper API to use,
as rawsize() will accurately report the size of revisions which have
a negative size in the index.

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, 1:15 PM
This revision was automatically updated to reflect the committed changes.