[PATCH 7 of 9 RFC] revset: added order property to lazyset classes

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Feb 14 14:48:20 CST 2014



On 02/14/2014 09:49 AM, Matt Mackall wrote:
> On Wed, 2014-02-12 at 14:39 -0800, Lucas Moscovicz wrote:
>> # HG changeset patch
>> # User Lucas Moscovicz <lmoscovicz at fb.com>
>> # Date 1391791458 28800
>> #      Fri Feb 07 08:44:18 2014 -0800
>> # Node ID 35e93209ef29f786911232f9f37ad95661abf3d9
>> # Parent  1cc650bf69c051609ef85d955d7562cbf9285743
>> revset: added order property to lazyset classes
>
> This looks promising. Using strings for the direction names is a bit
> unfortunate though.
>
> Perhaps we can do something like this:
>
> def ascending(self):
>      # true if we can -efficiently- traverse this set in ascending order
>
> def descending(self):
>      # true if we can -efficiently- traverse this set in descending order

If we can use more attribute instead of function call that would help to 
avoid the Python slowness.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list