[PATCH] churn: generalisation, now it is possible to see statistics grouped by custom template

Alexander Solovyov piranha at piranha.org.ua
Mon Oct 6 01:47:47 CDT 2008


Ave, Benoit Boissinot, on  6.10 at 01:25 you wrote:

>> churn: generalisation, now it is possible to see statistics grouped by custom template

> I like the way you're doing it :)
> Some comments below (and maybe you could expand the doc with more examples).

Done.

>> +'''allow graphing the number of lines (of count of revisions) grouped by template'''

> Is it meant to be "or count of revisions"?

Fixed.

>> -
>> -        if progress:
>> +        if opts['progress']:
> we tend to prefer opts.get() for option retrieval, but it's not really
> important,
> in this case, it's supposed to be always set, right ?

Hm, I prefer to use opts.get() too, because it caused some inconvenience
for me when I've used python shell to work with hg. I can't precisely
remember why I haven't go opts.get() way here, maybe because this part
was copied from churn? But I have changed that alogn with opts['lines'].

>> +    maxdate = max(len(k) for k, v in rate)

> maybe this is misnamed (maxname ?)

Oops, fixed.

>> +    opts.update({'lines': True,
>> +                 'sort': False,
>> +                 'template': '{author|email}'})
>> +    stats(ui, repo, *(), **opts)

> why the *() ? and I think you could just do:
> stats(ui, repo, lines=True, sort=False, ..., **opts)

I feel dumb for this piece of code, it really looks strange for me
too. Fixed. :-)

> The following is unrelated, right ?

Yep, right after sending first message I've sent patch without this part.

-- 
Alexander


More information about the Mercurial-devel mailing list