D7236: repoview: wrap changelog class when filtering
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Nov 6 00:59:16 UTC 2019
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D7236
AFFECTED FILES
mercurial/repoview.py
CHANGE DETAILS
diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -220,6 +220,12 @@
def wrapchangelog(unfichangelog, filteredrevs):
cl = copy.copy(unfichangelog)
cl.filteredrevs = filteredrevs
+
+ class filteredchangelog(cl.__class__):
+ pass
+
+ cl.__class__ = filteredchangelog
+
return cl
class repoview(object):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list