[PATCH 0 of 2] add the template keyword 'children'

Martin Geisler mg at lazybytes.net
Fri Jul 23 04:15:55 CDT 2010


Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:

> On 22 Jul 2010, at 22:24, Martin Geisler wrote:
>
>> jfh <jason at jasonfharris.com> writes:
>> 
>>> This patch adds the template keyword 'children'.
>> 
>> Sure, I like the symmetri of this. Pushed to crew as 6faf015e0ba0 and
>> 83eb6b1465bf.
>
> Erm, this may not be as good an idea as it seems, as the symmetry is
> deceptive. Whereas changectx.parents() is available in the revlog,
> changectx.children() inspects all changesets following the one called,
> to see if they are a child.

Ouch, you're right... :-/

> If children is added to a template, and it's used log all revisions in
> a repository, log has suddenly gone from O(n) to O(n^2). Although this
> may not matter in most cases, it can make a *huge* difference for
> large repositories.

Yes, certainly. The question is if we should let the users decide when
it gets too painful to use this keyword, or if we should decide for them
and simply not offer it.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list