% def refs_to_html(refs): % for ref in refs: % c = ref.split('/', 2) % if len(c) != 3: % return % end % if c[1] == 'heads': {{c[2]}} % elif c[1] == 'tags': % if c[2].endswith('^{}'): % c[2] = c[2][:-3] % end {{c[2]}} % end % end % end % refs = repo.refs() % if not defined("commits"): % commits = repo.commits(start_ref, limit = limit, offset = offset) % end % for c in commits: % if c.id in refs: % end % end
{{c.author_date.utc.date()}} {{shorten(c.subject)}} {{shorten(c.author_name, 26)}} % refs_to_html(refs[c.id])