|
|
@@ -40,7 +40,6 @@ class DataCollector:
|
|
40
|
40
|
"""Manages data collection from a revision control repository."""
|
|
41
|
41
|
def __init__(self):
|
|
42
|
42
|
self.stamp_created = time.time()
|
|
43
|
|
- pass
|
|
44
|
43
|
|
|
45
|
44
|
##
|
|
46
|
45
|
# This should be the main function to extract data from the repository.
|
|
|
@@ -132,7 +131,6 @@ class GitDataCollector(DataCollector):
|
|
132
|
131
|
except ValueError:
|
|
133
|
132
|
stamp = 0
|
|
134
|
133
|
self.tags[tag] = { 'stamp': stamp, 'hash' : hash, 'date' : datetime.datetime.fromtimestamp(stamp).strftime('%Y-%m-%d') }
|
|
135
|
|
- pass
|
|
136
|
134
|
|
|
137
|
135
|
# Collect revision statistics
|
|
138
|
136
|
# Outputs "<stamp> <author>"
|
|
|
@@ -187,7 +185,7 @@ class GitDataCollector(DataCollector):
|
|
187
|
185
|
# author stats
|
|
188
|
186
|
if author not in self.authors:
|
|
189
|
187
|
self.authors[author] = {}
|
|
190
|
|
- # TODO commits
|
|
|
188
|
+ # commits
|
|
191
|
189
|
if 'last_commit_stamp' not in self.authors[author]:
|
|
192
|
190
|
self.authors[author]['last_commit_stamp'] = stamp
|
|
193
|
191
|
self.authors[author]['first_commit_stamp'] = stamp
|
|
|
@@ -376,10 +374,9 @@ class HTMLReportCreator(ReportCreator):
|
|
376
|
374
|
ReportCreator.create(self, data, path)
|
|
377
|
375
|
self.title = data.projectname
|
|
378
|
376
|
|
|
379
|
|
- # TODO copy the CSS if it does not exist
|
|
|
377
|
+ # copy the CSS if it does not exist
|
|
380
|
378
|
if not os.path.exists(path + '/gitstats.css'):
|
|
381
|
379
|
shutil.copyfile('gitstats.css', path + '/gitstats.css')
|
|
382
|
|
- pass
|
|
383
|
380
|
|
|
384
|
381
|
f = open(path + "/index.html", 'w')
|
|
385
|
382
|
format = '%Y-%m-%d %H:%m:%S'
|
|
|
@@ -664,7 +661,6 @@ class HTMLReportCreator(ReportCreator):
|
|
664
|
661
|
f.close()
|
|
665
|
662
|
|
|
666
|
663
|
self.createGraphs(path)
|
|
667
|
|
- pass
|
|
668
|
664
|
|
|
669
|
665
|
def createGraphs(self, path):
|
|
670
|
666
|
print 'Generating graphs...'
|