Mercurial > hg-stable
diff mercurial/hgweb/webcommands.py @ 14771:0cc66f13bea0 stable
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'.
author | Jesse Long <jpl@unknown.za.net> |
---|---|
date | Wed, 29 Jun 2011 09:36:45 +0200 |
parents | 9f908ef5a595 |
children | d06b9c55ddab |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Wed Jun 29 15:49:35 2011 +0300 +++ b/mercurial/hgweb/webcommands.py Wed Jun 29 09:36:45 2011 +0200 @@ -432,10 +432,10 @@ 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(),