|
a/Allura/allura/model/repo.py |
|
b/Allura/allura/model/repo.py |
|
... |
|
... |
540 |
results = []
|
540 |
results = []
|
541 |
for type, names in (('DIR', tree_names), ('BLOB', blob_names)):
|
541 |
for type, names in (('DIR', tree_names), ('BLOB', blob_names)):
|
542 |
for name in names:
|
542 |
for name in names:
|
543 |
commit_info = commit_infos.get(lcd.by_name.get(name))
|
543 |
commit_info = commit_infos.get(lcd.by_name.get(name))
|
544 |
if not commit_info:
|
544 |
if not commit_info:
|
545 |
continue
|
545 |
commit_info = defaultdict(str)
|
|
|
546 |
elif 'id' in commit_info:
|
|
|
547 |
commit_info['href'] = self.repo.url_for_commit(commit_info['id'])
|
546 |
results.append(dict(
|
548 |
results.append(dict(
|
547 |
kind=type,
|
549 |
kind=type,
|
548 |
name=name,
|
550 |
name=name,
|
549 |
href=name,
|
551 |
href=name,
|
550 |
last_commit=dict(
|
552 |
last_commit=dict(
|
551 |
author=commit_info['author'],
|
553 |
author=commit_info['author'],
|
552 |
author_email=commit_info['author_email'],
|
554 |
author_email=commit_info['author_email'],
|
553 |
author_url=commit_info['author_url'],
|
555 |
author_url=commit_info['author_url'],
|
554 |
date=commit_info['date'],
|
556 |
date=commit_info['date'],
|
555 |
href=self.repo.url_for_commit(commit_info['id']),
|
557 |
href=commit_info.get('href',''),
|
556 |
shortlink=commit_info['shortlink'],
|
558 |
shortlink=commit_info['shortlink'],
|
557 |
summary=commit_info['summary'],
|
559 |
summary=commit_info['summary'],
|
558 |
),
|
560 |
),
|
559 |
))
|
561 |
))
|
560 |
return results
|
562 |
return results
|