comparison mercurial/hgweb/webcommands.py @ 20193:7d40e706412c

hgweb: simplify summary with repo.branchmap().iterbranches()
author Brodie Rao <brodie@sf.io>
date Mon, 16 Sep 2013 01:08:29 -0700
parents 1c46b18b0e1c
children 9985e188d940
comparison
equal deleted inserted replaced
20192:38fad5e76ee8 20193:7d40e706412c
594 'node': hex(n)} 594 'node': hex(n)}
595 595
596 def branches(**map): 596 def branches(**map):
597 parity = paritygen(web.stripecount) 597 parity = paritygen(web.stripecount)
598 598
599 b = web.repo.branchtags() 599 b = web.repo.branchmap()
600 l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()] 600 l = [(-web.repo.changelog.rev(tip), tip, tag)
601 for tag, heads, tip, closed in b.iterbranches()]
601 for r, n, t in sorted(l): 602 for r, n, t in sorted(l):
602 yield {'parity': parity.next(), 603 yield {'parity': parity.next(),
603 'branch': t, 604 'branch': t,
604 'node': hex(n), 605 'node': hex(n),
605 'date': web.repo[n].date()} 606 'date': web.repo[n].date()}