mercurial/hgweb/webcommands.py
changeset 8796 2bcef677a6c3
parent 8713 de6bb29e208a
child 8842 acd03a6e2426
--- a/mercurial/hgweb/webcommands.py	Mon Jun 08 20:02:44 2009 +0200
+++ b/mercurial/hgweb/webcommands.py	Wed Jun 10 19:11:49 2009 -0400
@@ -361,7 +361,7 @@
 def branches(web, req, tmpl):
     b = web.repo.branchtags()
     tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
-    open = set(web.repo[n].branch() for n in web.repo.heads(closed=False))
+    heads = web.repo.heads()
     parity = paritygen(web.stripecount)
     sortkey = lambda ctx: ('close' not in ctx.extra(), ctx.rev())
 
@@ -371,7 +371,12 @@
             if limit > 0 and count >= limit:
                 return
             count += 1
-            status = ctx.branch() in open and 'open' or 'closed'
+            if ctx.node() not in heads:
+                status = 'inactive'
+            elif not web.repo.branchheads(ctx.branch()):
+                status = 'closed'
+            else:
+                status = 'open'
             yield {'parity': parity.next(),
                    'branch': ctx.branch(),
                    'status': status,