diff hgext3rd/topic/discovery.py @ 4742:db3e7f6b5ceb

py3: switch from iteritems() to items() in the topics extension The only remaining iteritems() call is on branchmap. That will be dealt with in the next patch.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 12 Jul 2019 23:24:04 -0700
parents 75b414b298f5
children 92e3db149d7d
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py	Sun Jul 14 22:34:36 2019 -0700
+++ b/hgext3rd/topic/discovery.py	Fri Jul 12 23:24:04 2019 -0700
@@ -110,7 +110,7 @@
         repo.unfiltered = lambda: unxx
         pushop.repo = repo
         summary = orig(pushop)
-        for key, value in summary.iteritems():
+        for key, value in summary.items():
             if ':' in key: # This is a topic
                 if value[0] is None and value[1]:
                     summary[key] = ([value[1][0]], ) + value[1:]
@@ -171,12 +171,12 @@
         if repo is not None:
             repo.invalidatecaches()
             finalheads = _nbheads(repo)
-            for branch, oldnb in tr._prepushheads.iteritems():
+            for branch, oldnb in tr._prepushheads.items():
                 newnb = finalheads.pop(branch, 0)
                 if oldnb < newnb:
                     msg = _('push create a new head on branch "%s"' % branch)
                     raise error.Abort(msg)
-            for branch, newnb in finalheads.iteritems():
+            for branch, newnb in finalheads.items():
                 if 1 < newnb:
                     msg = _('push create more than 1 head on new branch "%s"'
                             % branch)