Mercurial > hg
diff 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 |
line wrap: on
line diff
--- 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 = {}