# HG changeset patch # User Martin von Zweigbergk # Date 1562999044 25200 # Node ID db3e7f6b5ceb739d6b8c96d4e1e551fb0fe9eef7 # Parent e8727a27e38074ba9825a6961020db8fa0d732fe 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. diff -r e8727a27e380 -r db3e7f6b5ceb hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Sun Jul 14 22:34:36 2019 -0700 +++ b/hgext3rd/topic/__init__.py Fri Jul 12 23:24:04 2019 -0700 @@ -813,7 +813,7 @@ bmstore = repo._bookmarks nodetobook = {} - for book, revnode in bmstore.iteritems(): + for book, revnode in bmstore.items(): if nodetobook.get(revnode): nodetobook[revnode].append(book) else: @@ -845,7 +845,7 @@ actions[(bookmark, revnum)] = targetrevs elif convertall: - for bmark, revnode in sorted(bmstore.iteritems()): + for bmark, revnode in sorted(bmstore.items()): revnum = repo[revnode].rev() if revnum in skipped: continue @@ -863,7 +863,7 @@ if actions: try: tr = repo.transaction('debugconvertbookmark') - for ((bmark, revnum), targetrevs) in sorted(actions.iteritems()): + for ((bmark, revnum), targetrevs) in sorted(actions.items()): _applyconvertbmarktopic(ui, repo, targetrevs, revnum, bmark, tr) tr.close() finally: diff -r e8727a27e380 -r db3e7f6b5ceb hgext3rd/topic/discovery.py --- 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)