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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Dec 29 00:49:49 UTC 2017


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

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):



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


More information about the Mercurial-devel mailing list