# HG changeset patch # User Martin von Zweigbergk # Date 2019-11-05 22:06:11 # Node ID 625e7d1ffd1c7d952a372ab7e77b0bd88ee02b50 # Parent d630c5710801d4fabedf742a42c1a236b0da8b07 repoview: wrap changelog class when filtering The class doesn't yet do anything. I'll move the filter-aware overrides from the changelog class over one by one to this class in coming patches. That will leave the changelog class simpler and will centralize more of the filtering logic to repoview. I could not measure any performance difference. Differential Revision: https://phab.mercurial-scm.org/D7236 diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -221,6 +221,12 @@ def filterrevs(repo, filtername, visibil def wrapchangelog(unfichangelog, filteredrevs): cl = copy.copy(unfichangelog) cl.filteredrevs = filteredrevs + + class filteredchangelog(cl.__class__): + pass + + cl.__class__ = filteredchangelog + return cl