Mercurial > hg
comparison mercurial/manifest.py @ 35586:fbf1a5d680ea
py3: don't use dict.iterkeys()
Instead of iterating of dict.iterkeys(), let's iterate of dict as that will be
equivalent and dict.iterkeys() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D1796
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 05:47:17 +0530 |
parents | 05167447f90d |
children | 59adb3051718 |
comparison
equal
deleted
inserted
replaced
35585:35fb3367f72d | 35586:fbf1a5d680ea |
---|---|
808 self._load() | 808 self._load() |
809 for p in sorted(itertools.chain(self._dirs, self._files)): | 809 for p in sorted(itertools.chain(self._dirs, self._files)): |
810 if p in self._files: | 810 if p in self._files: |
811 yield self._subpath(p) | 811 yield self._subpath(p) |
812 else: | 812 else: |
813 for f in self._dirs[p].iterkeys(): | 813 for f in self._dirs[p]: |
814 yield f | 814 yield f |
815 | 815 |
816 def keys(self): | 816 def keys(self): |
817 return list(self.iterkeys()) | 817 return list(self.iterkeys()) |
818 | 818 |