Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/obsutil.py @ 49004:f254fc73d956
global: bulk replace simple pycompat.iteritems(x) with x.items()
pycompat.iteritems() just calls .items().
This commit applies a regular expression search and replace to convert
simple instances of pycompat.iteritems() with .items(). There are still
a handful of calls to pycompat.iteritems() remaining. But these all have
more complicated expressions that I wasn't comfortable performing an
automated replace on. In addition, some simple replacements were withheld
because they broke pytype. These will be handled by their own changesets.
Differential Revision: https://phab.mercurial-scm.org/D12318
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 03 Mar 2022 18:28:30 -0800 |
parents | 6000f5b25c9b |
children | 642e31cb55f0 |
comparison
equal
deleted
inserted
replaced
49003:a0674e916fb6 | 49004:f254fc73d956 |
---|---|
16 from . import ( | 16 from . import ( |
17 diffutil, | 17 diffutil, |
18 encoding, | 18 encoding, |
19 error, | 19 error, |
20 phases, | 20 phases, |
21 pycompat, | |
22 util, | 21 util, |
23 ) | 22 ) |
24 from .utils import dateutil | 23 from .utils import dateutil |
25 | 24 |
26 ### obsolescence marker flag | 25 ### obsolescence marker flag |
995 # we already know the latest base for this divergency | 994 # we already know the latest base for this divergency |
996 continue | 995 continue |
997 base[tuple(nsuccset)] = n | 996 base[tuple(nsuccset)] = n |
998 return [ | 997 return [ |
999 {b'divergentnodes': divset, b'commonpredecessor': b} | 998 {b'divergentnodes': divset, b'commonpredecessor': b} |
1000 for divset, b in pycompat.iteritems(base) | 999 for divset, b in base.items() |
1001 ] | 1000 ] |
1002 | 1001 |
1003 | 1002 |
1004 def whyunstable(repo, ctx): | 1003 def whyunstable(repo, ctx): |
1005 result = [] | 1004 result = [] |