( )⚙ D3065 repair: use repo.file().files() to rebuild fncache

This is an archive of the discontinued Mercurial Phabricator instance.

repair: use repo.file().files() to rebuild fncache
AbandonedPublic

Authored by indygreg on Apr 3 2018, 9:56 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Previously, the fncache code assumed that .i and .d revlog
files were being used.

The file storage interface has a files() API to declare the
paths of underlying files that are backing storage. It will
always return the .i file. And depending on whether the revlog
is inline, it will return the .d.

This change will make rebuilding the fncache a bit slower since
we now have to open revlogs. But this is the only reasonable
way to support multiple storage backends with fncache at this
juncture. This code is only called from debug* commands, so the
perf hit shouldn't matter.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Apr 3 2018, 9:56 PM
indygreg abandoned this revision.Apr 4 2018, 1:56 PM

I'm just going to disable fncache with the simple store. All test functionality for hg debugrebuildfncache will be disabled unless an fncache is in play.