Commits

Thomas Capricelli committed 17addc7

cleaning

Comments (0)

Files changed (1)

             continue
         # do it
         ctx = options.repo.changectx(i)
-        for k, v in fetch_data(ctx, stat_maker, options):            
-            if not data.has_key(k):
-                data[k] = {}
-            data[k][date] = sum(v)
+        localstat = sum(stat_maker(ctx, options))
+        for title in fetch_data(ctx, options):            
+            if not data.has_key(title):
+                data[title] = {}
+            data[title][date] = localstat
 
     # post_collect_data
     titlemap = {}
     options.titlemap = titlemap
     return data
 
-def fetch_data_any(ctx, stat_maker, options):
+def fetch_data_any(ctx, options):
     # data only contains one entry for the global graphic
-    yield 'Overall activity', stat_maker(ctx, options)
+    yield 'Overall activity'
     
-def fetch_data_authors(ctx, stat_maker, options):
-    localstat = stat_maker(ctx, options)
+def fetch_data_authors(ctx, options):
     # data is dictionnary mapping an author name to the data for
     # this author
     email = util.email(ctx.user())
     email = options.amap.get(email, email) # alias remap
-    yield email, localstat
+    yield email
 
-def fetch_data_files(ctx, stat_maker, options):
-    localstat = stat_maker(ctx, options)
+def fetch_data_files(ctx, options):
     for filename in ctx.files():
-        yield filename, localstat
+        yield filename
 
-def fetch_data_branches(ctx, stat_maker, options):
-    yield ctx.branch() , stat_maker(ctx, options)
+def fetch_data_branches(ctx, options):
+    yield ctx.branch()
 
-def fetch_data_directories(ctx, stat_maker, options):
-    localstat = stat_maker(ctx, options)
+def fetch_data_directories(ctx, options):
     dirs = [ path.split(filename)[0] for filename in ctx.files()]
     dirs = list(set(dirs)) # remove duplicate
     if '' in dirs:
         dirs[dirs.index('')] = '<main directory>'
     for dir in dirs:
-        yield dir , localstat
+        yield dir
 
 # vim: ai ts=4 sts=4 et sw=4