##// END OF EJS Templates
hgweb: allow distinction between open/closed branches on branches page
Dirkjan Ochtman -
r8713:de6bb29e default
parent child Browse files
Show More
@@ -361,16 +361,20 b' def tags(web, req, tmpl):'
361 def branches(web, req, tmpl):
361 def branches(web, req, tmpl):
362 b = web.repo.branchtags()
362 b = web.repo.branchtags()
363 tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
363 tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
364 open = set(web.repo[n].branch() for n in web.repo.heads(closed=False))
364 parity = paritygen(web.stripecount)
365 parity = paritygen(web.stripecount)
366 sortkey = lambda ctx: ('close' not in ctx.extra(), ctx.rev())
365
367
366 def entries(limit, **map):
368 def entries(limit, **map):
367 count = 0
369 count = 0
368 for ctx in sorted(tips, key=lambda x: x.rev(), reverse=True):
370 for ctx in sorted(tips, key=sortkey, reverse=True):
369 if limit > 0 and count >= limit:
371 if limit > 0 and count >= limit:
370 return
372 return
371 count += 1
373 count += 1
374 status = ctx.branch() in open and 'open' or 'closed'
372 yield {'parity': parity.next(),
375 yield {'parity': parity.next(),
373 'branch': ctx.branch(),
376 'branch': ctx.branch(),
377 'status': status,
374 'node': ctx.hex(),
378 'node': ctx.hex(),
375 'date': ctx.date()}
379 'date': ctx.date()}
376
380
@@ -136,7 +136,7 b' branches = ../paper/branches.tmpl'
136 branchentry = '
136 branchentry = '
137 <tr class="tagEntry parity{parity}">
137 <tr class="tagEntry parity{parity}">
138 <td>
138 <td>
139 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">
139 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
140 {branch|escape}
140 {branch|escape}
141 </a>
141 </a>
142 </td>
142 </td>
@@ -165,7 +165,7 b" branchentry = '"
165 <tr class="parity{parity}">
165 <tr class="parity{parity}">
166 <td class="age"><i>{date|age} ago</i></td>
166 <td class="age"><i>{date|age} ago</i></td>
167 <td><a class="list" href="{url}shortlog/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td>
167 <td><a class="list" href="{url}shortlog/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></a></td>
168 <td>{branch|escape}</td>
168 <td class="{status}">{branch|escape}</td>
169 <td class="link">
169 <td class="link">
170 <a href="{url}changeset/{node|short}{sessionvars%urlparameter}">changeset</a> |
170 <a href="{url}changeset/{node|short}{sessionvars%urlparameter}">changeset</a> |
171 <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
171 <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
@@ -142,7 +142,7 b" branchentry = '"
142 <tr class="parity{parity}">
142 <tr class="parity{parity}">
143 <td class="nowrap">{date|age} ago</td>
143 <td class="nowrap">{date|age} ago</td>
144 <td><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
144 <td><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{node|short}</a></td>
145 <td>{branch|escape}</td>
145 <td class="{status}">{branch|escape}</td>
146 <td class="nowrap">
146 <td class="nowrap">
147 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
147 <a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> |
148 <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
148 <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> |
@@ -136,7 +136,7 b' branches = branches.tmpl'
136 branchentry = '
136 branchentry = '
137 <tr class="tagEntry parity{parity}">
137 <tr class="tagEntry parity{parity}">
138 <td>
138 <td>
139 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">
139 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">
140 {branch|escape}
140 {branch|escape}
141 </a>
141 </a>
142 </td>
142 </td>
@@ -133,7 +133,7 b' branches = branches.tmpl'
133 branchentry = '
133 branchentry = '
134 <li class="tagEntry parity{parity}">
134 <li class="tagEntry parity{parity}">
135 <tt class="node">{node}</tt>
135 <tt class="node">{node}</tt>
136 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">{branch|escape}</a>
136 <a href="{url}shortlog/{node|short}{sessionvars%urlparameter}" class="{status}">{branch|escape}</a>
137 </li>'
137 </li>'
138 diffblock = '<pre class="parity{parity}">{lines}</pre>'
138 diffblock = '<pre class="parity{parity}">{lines}</pre>'
139 changelogtag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
139 changelogtag = '<tr><th class="tag">tag:</th><td class="tag">{tag|escape}</td></tr>'
@@ -196,6 +196,8 b' h3 {'
196 .fileline { font-family: monospace; }
196 .fileline { font-family: monospace; }
197 .fileline img { border: 0; }
197 .fileline img { border: 0; }
198
198
199 .tagEntry .closed { color: #99f; }
200
199 /* Changeset entry */
201 /* Changeset entry */
200 #changesetEntry {
202 #changesetEntry {
201 border-collapse: collapse;
203 border-collapse: collapse;
@@ -185,6 +185,8 b' h3 {'
185 .fileline { font-family: monospace; }
185 .fileline { font-family: monospace; }
186 .fileline img { border: 0; }
186 .fileline img { border: 0; }
187
187
188 .tagEntry .closed { color: #99f; }
189
188 /* Changeset entry */
190 /* Changeset entry */
189 #changesetEntry {
191 #changesetEntry {
190 border-collapse: collapse;
192 border-collapse: collapse;
@@ -522,7 +522,7 b' branches |'
522 <tr class="parity0">
522 <tr class="parity0">
523 <td class="age"><i>many years ago</i></td>
523 <td class="age"><i>many years ago</i></td>
524 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
524 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
525 <td>stable</td>
525 <td class="open">stable</td>
526 <td class="link">
526 <td class="link">
527 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
527 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
528 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
528 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
@@ -532,7 +532,7 b' branches |'
532 <tr class="parity1">
532 <tr class="parity1">
533 <td class="age"><i>many years ago</i></td>
533 <td class="age"><i>many years ago</i></td>
534 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
534 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
535 <td>default</td>
535 <td class="closed">default</td>
536 <td class="link">
536 <td class="link">
537 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
537 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
538 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
538 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
@@ -670,7 +670,7 b' summary |'
670 <tr class="parity0">
670 <tr class="parity0">
671 <td class="age"><i>many years ago</i></td>
671 <td class="age"><i>many years ago</i></td>
672 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
672 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
673 <td>stable</td>
673 <td class="">stable</td>
674 <td class="link">
674 <td class="link">
675 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
675 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
676 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
676 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
@@ -680,7 +680,7 b' summary |'
680 <tr class="parity1">
680 <tr class="parity1">
681 <td class="age"><i>many years ago</i></td>
681 <td class="age"><i>many years ago</i></td>
682 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
682 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
683 <td>default</td>
683 <td class="">default</td>
684 <td class="link">
684 <td class="link">
685 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
685 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
686 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
686 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
General Comments 0
You need to be logged in to leave comments. Login now