[PATCH 3 of 8] revset: added lazyset implementation to filelog revset

Matt Mackall mpm at selenic.com
Tue Feb 11 16:51:07 CST 2014


On Tue, 2014-02-11 at 13:54 -0800, Lucas Moscovicz wrote:
> # HG changeset patch
> # User Lucas Moscovicz <lmoscovicz at fb.com>
> # Date 1391473699 28800
> #      Mon Feb 03 16:28:19 2014 -0800
> # Node ID f34fe1564f148a4c6e70e2e0e1409f8f723cf772
> # Parent  bccc2dbcf3b60c9c2d0721c7ca5ebd09fa460c50
> revset: added lazyset implementation to filelog revset
> 
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -742,7 +742,7 @@
>                  for fr in fl:
>                      s.add(fl.linkrev(fr))
>  
> -    return baseset([r for r in subset if r in s])
> +    return subset & s

Another instance of "we did all the real work already".

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list