[PATCH] py3: revset - change iteritems to items

Martijn Pieters mj at zopatista.com
Sat Oct 8 12:42:55 EDT 2016


On 8 October 2016 at 18:37, Mateusz Kwapich <mitrandir at fb.com> wrote:

> # HG changeset patch
> # User Mateusz Kwapich <mitrandir at fb.com>
> # Date 1475944606 25200
> #      Sat Oct 08 09:36:46 2016 -0700
> # Node ID 18cee0bbfd402a5005b286b723a6a495bf86a165
> # Parent  02795fabd7daf1b35b4d36de3dbca16e55a63451
> py3: revset - change iteritems to items
>
> If we'll ever have so many revset predicated so that using "items" is
> creating
> pref problems we'll have bigger problem than just that.
>

LGTM. We may still want to figure out why the importer hook doesn't catch
this one; there may be other places (in external code) where it'll fail
too. Low priority with this fix though.


> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -3835,7 +3835,7 @@ def prettyformatset(revs):
>  def loadpredicate(ui, extname, registrarobj):
>      """Load revset predicates from specified registrarobj
>      """
> -    for name, func in registrarobj._table.iteritems():
> +    for name, func in registrarobj._table.items():
>          symbols[name] = func
>          if func._safe:
>              safesymbols.add(name)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>



-- 
Martijn Pieters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20161008/c241e5f0/attachment.html>


More information about the Mercurial-devel mailing list