Re: [PATCH] store: get rid of dict comprehension for py2.6 compat

2016-10-09 Thread Kevin Bullock
> On Oct 9, 2016, at 15:05, Pulkit Goyal <7895pul...@gmail.com> wrote:
> 
> On Sun, Oct 9, 2016 at 3:02 PM, Mateusz Kwapich  wrote:
>> # HG changeset patch
>> # User Mateusz Kwapich 
>> # Date 1476018084 25200
>> #  Sun Oct 09 06:01:24 2016 -0700
>> # Node ID 801817b85eb04a7d6c9d211b2a34d7e140ce8ecb
>> # Parent  da08f4707282747cef3619341e07bd492470f41e
>> store: get rid of dict comprehension for py2.6 compat
> 
> Martijn already fixed this one and that is pushed.

Yep, Yuya queued it: 


I don't see it pushed to -committed yet, but I trust it will show up soon.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH] store: get rid of dict comprehension for py2.6 compat

2016-10-09 Thread Pulkit Goyal
On Sun, Oct 9, 2016 at 3:02 PM, Mateusz Kwapich  wrote:
> # HG changeset patch
> # User Mateusz Kwapich 
> # Date 1476018084 25200
> #  Sun Oct 09 06:01:24 2016 -0700
> # Node ID 801817b85eb04a7d6c9d211b2a34d7e140ce8ecb
> # Parent  da08f4707282747cef3619341e07bd492470f41e
> store: get rid of dict comprehension for py2.6 compat

Martijn already fixed this one and that is pushed.
> That's my bad. Let's change it to dict(generator).
>
> diff --git a/mercurial/store.py b/mercurial/store.py
> --- a/mercurial/store.py
> +++ b/mercurial/store.py
> @@ -107,7 +107,7 @@ def _buildencodefun():
>  asciistr = map(chr, xrange(127))
>  capitals = list(range(ord("A"), ord("Z") + 1))
>
> -cmap = {x:x for x in asciistr}
> +cmap = dict(((x,x) for x in asciistr))
>  for x in _reserved():
>  cmap[xchr(x)] = "~%02x" % x
>  for x in capitals + [ord(e)]:
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH] store: get rid of dict comprehension for py2.6 compat

2016-10-09 Thread Mateusz Kwapich
# HG changeset patch
# User Mateusz Kwapich 
# Date 1476018084 25200
#  Sun Oct 09 06:01:24 2016 -0700
# Node ID 801817b85eb04a7d6c9d211b2a34d7e140ce8ecb
# Parent  da08f4707282747cef3619341e07bd492470f41e
store: get rid of dict comprehension for py2.6 compat

That's my bad. Let's change it to dict(generator).

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -107,7 +107,7 @@ def _buildencodefun():
 asciistr = map(chr, xrange(127))
 capitals = list(range(ord("A"), ord("Z") + 1))
 
-cmap = {x:x for x in asciistr}
+cmap = dict(((x,x) for x in asciistr))
 for x in _reserved():
 cmap[xchr(x)] = "~%02x" % x
 for x in capitals + [ord(e)]:
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel