Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
14770:95a8c0f5dd3f | 14771:0cc66f13bea0 |
---|---|
430 count = 0 | 430 count = 0 |
431 for ctx in sorted(tips, key=sortkey, reverse=True): | 431 for ctx in sorted(tips, key=sortkey, reverse=True): |
432 if limit > 0 and count >= limit: | 432 if limit > 0 and count >= limit: |
433 return | 433 return |
434 count += 1 | 434 count += 1 |
435 if ctx.node() not in heads: | 435 if not web.repo.branchheads(ctx.branch()): |
436 status = 'closed' | |
437 elif ctx.node() not in heads: | |
436 status = 'inactive' | 438 status = 'inactive' |
437 elif not web.repo.branchheads(ctx.branch()): | |
438 status = 'closed' | |
439 else: | 439 else: |
440 status = 'open' | 440 status = 'open' |
441 yield {'parity': parity.next(), | 441 yield {'parity': parity.next(), |
442 'branch': ctx.branch(), | 442 'branch': ctx.branch(), |
443 'status': status, | 443 'status': status, |