py3: listify the return value of filter()
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 01 Mar 2018 23:52:30 +0530
changeset 36521 149c5af35de5
parent 36520 1c4247b0040a
child 36522 6e90c59b6da1
py3: listify the return value of filter() filter() on Python 3 returns a filter object. Differential Revision: https://phab.mercurial-scm.org/D2515
hgext/narrow/narrowchangegroup.py
--- a/hgext/narrow/narrowchangegroup.py	Thu Mar 01 23:51:32 2018 +0530
+++ b/hgext/narrow/narrowchangegroup.py	Thu Mar 01 23:52:30 2018 +0530
@@ -44,7 +44,7 @@
                       source):
         matcher = _cgmatcher(self)
         if matcher:
-            changedfiles = filter(matcher, changedfiles)
+            changedfiles = list(filter(matcher, changedfiles))
         if getattr(self, 'is_shallow', False):
             # See comment in generate() for why this sadness is a thing.
             mfdicts = self._mfdicts