[PATCH 1 of 2 RFC] revset: added generatorset class with cached __contains__ method
Kevin Bullock
kbullock+mercurial at ringworld.org
Fri Feb 14 11:34:37 CST 2014
On Feb 13, 2014, at 5:23 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Thu, 2014-02-13 at 14:58 -0800, Pierre-Yves David wrote:
>>
>> On 02/13/2014 02:56 PM, Lucas Moscovicz wrote:
>>> # HG changeset patch
>>> # User Lucas Moscovicz <lmoscovicz at fb.com>
>>> # Date 1391642591 28800
>>> # Wed Feb 05 15:23:11 2014 -0800
>>> # Node ID f4d973e19d267efa440d992583a860fc2f8eed98
>>> # Parent 365b233e02ebf05d1b91e48d12f28f0c5ddd990c
>>> revset: added generatorset class with cached __contains__ method
>>>
>>> diff --git a/mercurial/revset.py b/mercurial/revset.py
>>> --- a/mercurial/revset.py
>>> +++ b/mercurial/revset.py
>>> @@ -2145,6 +2145,36 @@
>>> def set(self):
>>> return set([r for r in self])
>>>
>>> +class generatorset(object):
>>> + def __init__(self, gen):
>>
>> Now that the big picture is emerging, I believe you should start adding
>> docstring to you code. Otherwise we'll end up with a very cool pile of
>> code that nobody can read without burning its brain for a day (MQ And
>> hgweb, I'm looking at you)
>
> Agreed, these look fine with a bit more docs/comments.
Also please use the --flag option when you patchbomb new versions of these patches. I see these two started out as part of a prior series of 9 -- but it takes me some squinting to determine that when I'm working thru a backlog in the hundreds of messages.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list