Patchwork D1910: obsutil: work around filter() being a generator in Python 3

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 11:34 p.m.
Message ID <c591ebc008b50bf0fb969a9862401820@localhost.localdomain>
Download mbox | patch
Permalink /patch/27198/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 11:34 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4705dc1500e0: obsutil: work around filter() being a generator in Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1910?vs=4915&id=5131

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

AFFECTED FILES
  mercurial/obsutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, indygreg
Cc: indygreg, mercurial-devel

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -421,10 +421,10 @@ 
 
         # Check if other meta has changed
         changeextra = changectx.extra().items()
-        ctxmeta = filter(metanotblacklisted, changeextra)
+        ctxmeta = list(filter(metanotblacklisted, changeextra))
 
         sourceextra = source.extra().items()
-        srcmeta = filter(metanotblacklisted, sourceextra)
+        srcmeta = list(filter(metanotblacklisted, sourceextra))
 
         if ctxmeta != srcmeta:
             effects |= METACHANGED