mercurial/hgweb/webcommands.py
changeset 18037 c8326ffdcb4f
parent 17991 d605a82cf189
parent 18030 ebc0fa067c07
child 18319 e350ce798b63
--- a/mercurial/hgweb/webcommands.py	Tue Dec 04 12:54:18 2012 -0800
+++ b/mercurial/hgweb/webcommands.py	Thu Dec 06 16:42:15 2012 -0600
@@ -399,7 +399,7 @@
                 branches=webutil.nodebranchdict(web.repo, ctx))
 
 def tags(web, req, tmpl):
-    i = reversed(web.repo.tagslist())
+    i = list(reversed(web.repo.tagslist()))
     parity = paritygen(web.stripecount)
 
     def entries(notip=False, limit=0, **map):
@@ -442,13 +442,16 @@
                 latestentry=lambda **x: entries(1, **x))
 
 def branches(web, req, tmpl):
-    tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
+    tips = []
     heads = web.repo.heads()
     parity = paritygen(web.stripecount)
     sortkey = lambda ctx: (not ctx.closesbranch(), ctx.rev())
 
     def entries(limit, **map):
         count = 0
+        if not tips:
+            for t, n in web.repo.branchtags().iteritems():
+                tips.append(web.repo[n])
         for ctx in sorted(tips, key=sortkey, reverse=True):
             if limit > 0 and count >= limit:
                 return