# HG changeset patch # User Anton Shestakov # Date 1441121370 -28800 # Node ID e466c15597a34d2a3edc00649f01601cbb72240c # Parent a103ecb8a04a2a38377fb7c84f0a821ee616ddd7 hgweb: use webutil.branchentries for branches on summary page This allows showing correct status for each branch, which was missing on /summary. Usually that means that closed branches get the same css class (resulting in e.g. different color/shade) as they do on /branches page. The sorting of the branches on summary page also changes and is now the same as on /branches page: closed branches are now at the end of the list. diff -r a103ecb8a04a -r e466c15597a3 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Tue Sep 01 22:28:45 2015 +0800 +++ b/mercurial/hgweb/webcommands.py Tue Sep 01 23:29:30 2015 +0800 @@ -685,18 +685,6 @@ 'date': web.repo[n].date(), 'node': hex(n)} - def branches(**map): - parity = paritygen(web.stripecount) - - b = web.repo.branchmap() - l = [(-web.repo.changelog.rev(tip), tip, tag) - for tag, heads, tip, closed in b.iterbranches()] - for r, n, t in sorted(l): - yield {'parity': parity.next(), - 'branch': t, - 'node': hex(n), - 'date': web.repo[n].date()} - def changelist(**map): parity = paritygen(web.stripecount, offset=start - end) l = [] # build a list in forward order for efficiency @@ -736,7 +724,7 @@ lastchange=tip.date(), tags=tagentries, bookmarks=bookmarks, - branches=branches, + branches=webutil.branchentries(web.repo, web.stripecount), shortlog=changelist, node=tip.hex(), symrev='tip', diff -r a103ecb8a04a -r e466c15597a3 tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t Tue Sep 01 22:28:45 2015 +0800 +++ b/tests/test-hgweb-commands.t Tue Sep 01 23:29:30 2015 +0800 @@ -1653,7 +1653,7 @@ Thu, 01 Jan 1970 00:00:00 +0000 cad8025a2e87 - unstable + unstable changeset | changelog | @@ -1663,7 +1663,7 @@ Thu, 01 Jan 1970 00:00:00 +0000 1d22e65f027e - stable + stable changeset | changelog | @@ -1673,7 +1673,7 @@ Thu, 01 Jan 1970 00:00:00 +0000 a4f92ed23982 - default + default changeset | changelog |