D2515: py3: listify the return value of filter()
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Mar 1 18:49:30 UTC 2018
pulkit created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
filter() on Python 3 returns a filter object.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2515
AFFECTED FILES
hgext/narrow/narrowchangegroup.py
CHANGE DETAILS
diff --git a/hgext/narrow/narrowchangegroup.py b/hgext/narrow/narrowchangegroup.py
--- a/hgext/narrow/narrowchangegroup.py
+++ b/hgext/narrow/narrowchangegroup.py
@@ -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
To: pulkit, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list