This is an archive of the discontinued Mercurial Phabricator instance.

lfs: access revlog directly
ClosedPublic

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

Details

Summary

LFS is monkeypatching filelog.filelog and is then accessing
various filelog attributes in the monkeypatched function. This is all
fine.

But some of the attributes being accessed by LFS are revlog centric
and shouldn't be exposed on the file storage interface.

This commit changes the monkeypatched functions to access proxied
attributes on self._revlog instead of self.

This should be safe to do because non-revlog repositories should not
be using filelog instances: instead they should have a separate class
to represent file storage. So it is reasonable for LFS to assume the
_revlog attribute exists and points to a revlog.

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
mharbison72 accepted this revision.Sep 25 2018, 12:36 AM
mharbison72 added a subscriber: mharbison72.

Seems reasonable to me.

This revision was automatically updated to reflect the committed changes.