Patchwork D7364: repoview: use class literal for creating filteredchangelog

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 10:34 p.m.
Message ID <154ce4b1e1a235a48df67e8d47283c08@localhost.localdomain>
Download mbox | patch
Permalink /patch/42984/
State Not Applicable
Headers show

Comments

phabricator - Nov. 8, 2019, 10:34 p.m.
Closed by commit rHGd1b8fcc38991: repoview: use class literal for creating filteredchangelog (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7364?vs=17801&id=17803

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

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

AFFECTED FILES
  mercurial/repoview.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -227,9 +227,10 @@ 
     cl = copy.copy(unfichangelog)
     cl.filteredrevs = filteredrevs
 
-    cl.__class__ = type(
-        'filteredchangelog', (filteredchangelogmixin, cl.__class__), {}
-    )
+    class filteredchangelog(filteredchangelogmixin, cl.__class__):
+        pass
+
+    cl.__class__ = filteredchangelog
 
     return cl