changeset 43442:625e7d1ffd1c

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 05 Nov 2019 14:06:11 -0800
parents d630c5710801
children 7bc8e49a7c35
files mercurial/repoview.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repoview.py	Tue Nov 05 14:00:46 2019 -0800
+++ b/mercurial/repoview.py	Tue Nov 05 14:06:11 2019 -0800
@@ -221,6 +221,12 @@
 def wrapchangelog(unfichangelog, filteredrevs):
     cl = copy.copy(unfichangelog)
     cl.filteredrevs = filteredrevs
+
+    class filteredchangelog(cl.__class__):
+        pass
+
+    cl.__class__ = filteredchangelog
+
     return cl