|
|
@@ -227,19 +227,20 @@ class GitDataCollector(DataCollector):
|
|
227
|
227
|
self.tags[tag]['authors'][author] = commits
|
|
228
|
228
|
|
|
229
|
229
|
# Collect revision statistics
|
|
230
|
|
- # Outputs "<stamp> <author>"
|
|
231
|
|
- lines = getpipeoutput(['git rev-list --pretty=format:"%at %ai %aE %an" HEAD', 'grep -v ^commit']).split('\n')
|
|
|
230
|
+ # Outputs "<stamp> <date> <time> <timezone> <author> '<' <mail> '>'"
|
|
|
231
|
+ lines = getpipeoutput(['git rev-list --pretty=format:"%at %ai %an <%aE>" HEAD', 'grep -v ^commit']).split('\n')
|
|
232
|
232
|
for line in lines:
|
|
233
|
|
- parts = line.split(' ')
|
|
|
233
|
+ parts = line.split(' ', 4)
|
|
234
|
234
|
author = ''
|
|
235
|
235
|
try:
|
|
236
|
236
|
stamp = int(parts[0])
|
|
237
|
237
|
except ValueError:
|
|
238
|
238
|
stamp = 0
|
|
239
|
239
|
timezone = parts[3]
|
|
240
|
|
- domain = parts[4].rsplit('@', 1)[1]
|
|
241
|
|
- if len(parts) > 5:
|
|
242
|
|
- author = ' '.join(parts[5:])
|
|
|
240
|
+ author, mail = parts[4].split('<', 1)
|
|
|
241
|
+ author = author.rstrip()
|
|
|
242
|
+ mail = mail.rstrip('>')
|
|
|
243
|
+ domain = mail.rsplit('@', 1)[1]
|
|
243
|
244
|
date = datetime.datetime.fromtimestamp(float(stamp))
|
|
244
|
245
|
|
|
245
|
246
|
# First and last commit stamp
|