Patchwork D1796: py3: don't use dict.iterkeys()

login
register
mail settings
Submitter phabricator
Date Dec. 29, 2017, 12:49 a.m.
Message ID <differential-rev-PHID-DREV-zaifc6eiaet6nxdfz7vy-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26491/
State Superseded
Headers show

Comments

phabricator - Dec. 29, 2017, 12:49 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -810,7 +810,7 @@ 
             if p in self._files:
                 yield self._subpath(p)
             else:
-                for f in self._dirs[p].iterkeys():
+                for f in self._dirs[p]:
                     yield f
 
     def keys(self):