# HG changeset patch # User Jesse Long # Date 2011-06-29 07:36:45 # Node ID 0cc66f13bea0215191b4e0f9a84e3bccf3cd9601 # Parent 95a8c0f5dd3f9af168ed2fdfe621195aea4e5d9e hgweb: treat branch attribute `closed' as more important than `inactive' In the branches page, branches that are closed and are merged into another branch are displayed as `inactive'. This patch changes that behaviour to show these branches as `closed'. For me, the `closed' attribute is more important than the `inactive' attribute. Branches that are not closed, and are merged into other branches will still be shown as `inactive'. Branches that are closed, and are not merged into other branches will still be shown as `closed'. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -432,10 +432,10 @@ def branches(web, req, tmpl): if limit > 0 and count >= limit: return count += 1 - if ctx.node() not in heads: + if not web.repo.branchheads(ctx.branch()): + status = 'closed' + elif ctx.node() not in heads: status = 'inactive' - elif not web.repo.branchheads(ctx.branch()): - status = 'closed' else: status = 'open' yield {'parity': parity.next(),