D7256: repoview: define filteredchangelog as a top-level (non-local) class

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Fri Nov 8 09:31:55 EST 2019


yuja added a comment.


  > +    cl.__class__ = type('filteredchangelog',
  > +                        (filteredchangelogmixin, cl.__class__),
  > +                        {})
  
  Nit: maybe this can be just `class filteredchangelog(...): pass` since
  we don't name the type dynamically.
  
  And we might need a class cache like _filteredrepotypes to work around
  leaks of dynamically-created types.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7256/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7256

To: martinvonz, #hg-reviewers, indygreg
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list