hgweb: simplify summary with repo.branchmap().iterbranches()
authorBrodie Rao <brodie@sf.io>
Mon, 16 Sep 2013 01:08:29 -0700
changeset 20193 7d40e706412c
parent 20192 38fad5e76ee8
child 20194 9985e188d940
hgweb: simplify summary with repo.branchmap().iterbranches()
mercurial/hgweb/webcommands.py
--- 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,