Mercurial > hg
changeset 9670:7d56b6ffef72
churn: fix changeset count (broken by 9b127e888640)
author | Alexander Solovyov <piranha@piranha.org.ua> |
---|---|
date | Fri, 30 Oct 2009 13:40:23 +0200 |
parents | 9b127e888640 |
children | 9471d9a900b4 |
files | hgext/churn.py tests/test-churn tests/test-churn.out |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/churn.py Thu Oct 29 20:50:24 2009 +0200 +++ b/hgext/churn.py Fri Oct 30 13:40:23 2009 +0200 @@ -63,7 +63,7 @@ key = getkey(ctx) key = amap.get(key, key) # alias remap if opts.get('changesets'): - rate[key] = rate.get(key, 0) + 1 + rate[key] = (rate.get(key, (0,))[0] + 1, 0) else: parents = ctx.parents() if len(parents) > 1:
--- a/tests/test-churn Thu Oct 29 20:50:24 2009 +0200 +++ b/tests/test-churn Fri Oct 30 13:40:23 2009 +0200 @@ -55,6 +55,9 @@ hg ci -Am "removed d/g/f2.txt" -u user1 -d 14:00 d/g/f2.txt hg churn --diffstat +echo % changeset number churn +hg churn -c + cd .. # issue 833: ZeroDivisionError
--- a/tests/test-churn.out Thu Oct 29 20:50:24 2009 +0200 +++ b/tests/test-churn.out Fri Oct 30 13:40:23 2009 +0200 @@ -32,5 +32,9 @@ user1 +3/-1 +++++++++++++++++++++++++++++++++++++++++-------------- user3 +3/-0 +++++++++++++++++++++++++++++++++++++++++ user2 +2/-0 +++++++++++++++++++++++++++ +% changeset number churn +user1 4 *************************************************************** +user3 3 *********************************************** +user2 2 ******************************** adding foo test 0