Show More
@@ -104,11 +104,9 b' def get_commits_stats(repo_name, ts_min_' | |||||
104 | last_rev = last_rev + 1 if last_rev > 0 else last_rev |
|
104 | last_rev = last_rev + 1 if last_rev > 0 else last_rev | |
105 | for rev in repo.revisions[last_rev:last_rev + parse_limit]: |
|
105 | for rev in repo.revisions[last_rev:last_rev + parse_limit]: | |
106 | last_cs = cs = repo.get_changeset(rev) |
|
106 | last_cs = cs = repo.get_changeset(rev) | |
107 |
k = |
|
107 | k = lmktime([cs.date.timetuple()[0], cs.date.timetuple()[1], | |
108 |
|
|
108 | cs.date.timetuple()[2], 0, 0, 0, 0, 0, 0]) | |
109 | timetupple = [int(x) for x in k.split('-')] |
|
109 | ||
110 | timetupple.extend([0 for _ in xrange(6)]) |
|
|||
111 | k = lmktime(timetupple) |
|
|||
112 | if commits_by_day_author_aggregate.has_key(author_key_cleaner(cs.author)): |
|
110 | if commits_by_day_author_aggregate.has_key(author_key_cleaner(cs.author)): | |
113 | try: |
|
111 | try: | |
114 | l = [timegetter(x) for x in commits_by_day_author_aggregate\ |
|
112 | l = [timegetter(x) for x in commits_by_day_author_aggregate\ | |
@@ -158,10 +156,7 b' def get_commits_stats(repo_name, ts_min_' | |||||
158 | else: |
|
156 | else: | |
159 | commits_by_day_aggregate[k] = 1 |
|
157 | commits_by_day_aggregate[k] = 1 | |
160 |
|
158 | |||
161 | overview_data = [] |
|
159 | overview_data = sorted(commits_by_day_aggregate.items(), key=itemgetter(0)) | |
162 | for k, v in commits_by_day_aggregate.items(): |
|
|||
163 | overview_data.append([k, v]) |
|
|||
164 | overview_data = sorted(overview_data, key=itemgetter(0)) |
|
|||
165 | if not commits_by_day_author_aggregate: |
|
160 | if not commits_by_day_author_aggregate: | |
166 | commits_by_day_author_aggregate[author_key_cleaner(repo.contact)] = { |
|
161 | commits_by_day_author_aggregate[author_key_cleaner(repo.contact)] = { | |
167 | "label":author_key_cleaner(repo.contact), |
|
162 | "label":author_key_cleaner(repo.contact), |
General Comments 0
You need to be logged in to leave comments.
Login now