Patchwork D2415: py3: convert dict.items() to list explicitly

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 11:18 a.m.
Message ID <differential-rev-PHID-DREV-f4fm5beoiw22h4pzrazu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28313/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 11:18 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  On python 3, dict.items() returns a dict_items object which cannot be sorted.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/churn.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -171,7 +171,7 @@ 
                     ui.warn(_("skipping malformed alias: %s\n") % l)
                 continue
 
-    rate = countrate(ui, repo, amap, *pats, **opts).items()
+    rate = list(countrate(ui, repo, amap, *pats, **opts).items())
     if not rate:
         return