Skip to content
Snippets Groups Projects
  • Gregory Szorc's avatar
    62a53204
    lfs: access revlog directly · 62a53204
    Gregory Szorc authored
    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.
    
    Differential Revision: https://phab.mercurial-scm.org/D4714
    62a53204
    History
    lfs: access revlog directly
    Gregory Szorc authored
    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.
    
    Differential Revision: https://phab.mercurial-scm.org/D4714