py3: use pycompat.ziplist instead of inbuilt zip
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 29 Dec 2017 03:32:04 +0530
changeset 35580 cb0db11f392d
parent 35579 15ddf83fbf84
child 35581 154754d1f137
py3: use pycompat.ziplist instead of inbuilt zip zip just like map on Python 3 returns a generator object instead of list. This results in error if we try to iterate over the result once we consume it. We have added pycompat.ziplist which returns a list. Differential Revision: https://phab.mercurial-scm.org/D1790
mercurial/context.py
--- a/mercurial/context.py	Fri Dec 29 05:35:57 2017 +0530
+++ b/mercurial/context.py	Fri Dec 29 03:32:04 2017 +0530
@@ -1122,7 +1122,7 @@
                 hist[f] = curr
                 del pcache[f]
 
-        return zip(hist[base][0], hist[base][1].splitlines(True))
+        return pycompat.ziplist(hist[base][0], hist[base][1].splitlines(True))
 
     def ancestors(self, followfirst=False):
         visit = {}