changeset 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 38fad5e76ee8
children 9985e188d940
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Mon Sep 16 01:08:29 2013 -0700
+++ b/mercurial/hgweb/webcommands.py	Mon Sep 16 01:08:29 2013 -0700
@@ -596,8 +596,9 @@
     def branches(**map):
         parity = paritygen(web.stripecount)
 
-        b = web.repo.branchtags()
-        l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()]
+        b = web.repo.branchmap()
+        l = [(-web.repo.changelog.rev(tip), tip, tag)
+             for tag, heads, tip, closed in b.iterbranches()]
         for r, n, t in sorted(l):
             yield {'parity': parity.next(),
                    'branch': t,