[PATCH 5 of 9] py3: replace dict.iterkeys() with iter(dict)

Yuya Nishihara yuya at tcha.org
Fri Jun 16 09:51:21 EDT 2017


On Fri, 16 Jun 2017 03:04:47 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1497557807 -19800
> #      Fri Jun 16 01:46:47 2017 +0530
> # Node ID 8c2bdaf9a1901676753ed57df5a99299ded8fa08
> # Parent  bdab6e36523f1e547f1753c67d84b3149fea59fe
> py3: replace dict.iterkeys() with iter(dict)
> 
> dict.iterkeys() does not exists on Python 3.
> 
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -838,7 +838,7 @@
>          for copykey, copyvalue in copy.iteritems():
>              if copyvalue in relevantfiles:
>                  relevantfiles.add(copykey)
> -        for movedirkey in movewithdir.iterkeys():
> +        for movedirkey in iter(movewithdir):

Nit: No explicit iter() needed. Updated in flight.


More information about the Mercurial-devel mailing list