comparison mercurial/context.py @ 35580:cb0db11f392d

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 29 Dec 2017 03:32:04 +0530
parents 265cd9e19d26
children fe4e1352c035
comparison
equal deleted inserted replaced
35579:15ddf83fbf84 35580:cb0db11f392d
1120 needed[p] -= 1 1120 needed[p] -= 1
1121 1121
1122 hist[f] = curr 1122 hist[f] = curr
1123 del pcache[f] 1123 del pcache[f]
1124 1124
1125 return zip(hist[base][0], hist[base][1].splitlines(True)) 1125 return pycompat.ziplist(hist[base][0], hist[base][1].splitlines(True))
1126 1126
1127 def ancestors(self, followfirst=False): 1127 def ancestors(self, followfirst=False):
1128 visit = {} 1128 visit = {}
1129 c = self 1129 c = self
1130 if followfirst: 1130 if followfirst: