[PATCH] scmutil: changed revrange code not to use append

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Feb 24 16:40:05 CST 2014



On 02/24/2014 02:37 PM, Lucas Moscovicz wrote:
> # HG changeset patch
> # User Lucas Moscovicz <lmoscovicz at fb.com>
> # Date 1393262852 28800
> #      Mon Feb 24 09:27:32 2014 -0800
> # Node ID be21c07d47d8b8ca158181b2ed491138780358d9
> # Parent  dbb13949e05d8c576672ea0a49a978048c77ddf7
> scmutil: changed revrange code not to use append
>
> Removed one call to the append method
>
> diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
> --- a/mercurial/scmutil.py
> +++ b/mercurial/scmutil.py
> @@ -517,7 +517,7 @@
>                   if rev in seen:
>                       continue
>                   seen.add(rev)
> -                l.append(rev)
> +                l = l + [rev]

Highly concerned by the performance impact of this. Can you elaborate on 
what and why is going on here?

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list