D2229: narrowrepo: filter() is a generator on py3, wrap in list()

2018-02-13 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0c104ee51918: narrowrepo: filter() is a generator on py3, 
wrap in list() (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2229?vs=5635&id=5642

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

AFFECTED FILES
  hgext/narrow/narrowrepo.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowrepo.py b/hgext/narrow/narrowrepo.py
--- a/hgext/narrow/narrowrepo.py
+++ b/hgext/narrow/narrowrepo.py
@@ -103,13 +103,13 @@
 def status(self, *args, **kwargs):
 s = super(narrowrepository, self).status(*args, **kwargs)
 narrowmatch = self.narrowmatch()
-modified = filter(narrowmatch, s.modified)
-added = filter(narrowmatch, s.added)
-removed = filter(narrowmatch, s.removed)
-deleted = filter(narrowmatch, s.deleted)
-unknown = filter(narrowmatch, s.unknown)
-ignored = filter(narrowmatch, s.ignored)
-clean = filter(narrowmatch, s.clean)
+modified = list(filter(narrowmatch, s.modified))
+added = list(filter(narrowmatch, s.added))
+removed = list(filter(narrowmatch, s.removed))
+deleted = list(filter(narrowmatch, s.deleted))
+unknown = list(filter(narrowmatch, s.unknown))
+ignored = list(filter(narrowmatch, s.ignored))
+clean = list(filter(narrowmatch, s.clean))
 return scmutil.status(modified, added, removed, deleted, unknown,
   ignored, clean)
 



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2229: narrowrepo: filter() is a generator on py3, wrap in list()

2018-02-13 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  I'm not sure if there are performance implications to this. But if there are, 
this will get addressed when this code moves to core.

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2229: narrowrepo: filter() is a generator on py3, wrap in list()

2018-02-13 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Was at the top of Python 3 exceptions.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/narrow/narrowrepo.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowrepo.py b/hgext/narrow/narrowrepo.py
--- a/hgext/narrow/narrowrepo.py
+++ b/hgext/narrow/narrowrepo.py
@@ -103,13 +103,13 @@
 def status(self, *args, **kwargs):
 s = super(narrowrepository, self).status(*args, **kwargs)
 narrowmatch = self.narrowmatch()
-modified = filter(narrowmatch, s.modified)
-added = filter(narrowmatch, s.added)
-removed = filter(narrowmatch, s.removed)
-deleted = filter(narrowmatch, s.deleted)
-unknown = filter(narrowmatch, s.unknown)
-ignored = filter(narrowmatch, s.ignored)
-clean = filter(narrowmatch, s.clean)
+modified = list(filter(narrowmatch, s.modified))
+added = list(filter(narrowmatch, s.added))
+removed = list(filter(narrowmatch, s.removed))
+deleted = list(filter(narrowmatch, s.deleted))
+unknown = list(filter(narrowmatch, s.unknown))
+ignored = list(filter(narrowmatch, s.ignored))
+clean = list(filter(narrowmatch, s.clean))
 return scmutil.status(modified, added, removed, deleted, unknown,
   ignored, clean)
 



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel