Show More
@@ -527,6 +527,23 b' class hgweb(object):' | |||||
527 | date = t) |
|
527 | date = t) | |
528 | parity += 1 |
|
528 | parity += 1 | |
529 |
|
529 | |||
|
530 | def heads(**map): | |||
|
531 | parity = 0 | |||
|
532 | count = 0 | |||
|
533 | ||||
|
534 | for node in self.repo.heads(): | |||
|
535 | count += 1 | |||
|
536 | if count > 10: | |||
|
537 | break; | |||
|
538 | ||||
|
539 | ctx = self.repo.changectx(node) | |||
|
540 | ||||
|
541 | yield {'parity': self.stripes(parity), | |||
|
542 | 'branch': ctx.branch(), | |||
|
543 | 'node': hex(node), | |||
|
544 | 'date': ctx.date()} | |||
|
545 | parity += 1 | |||
|
546 | ||||
530 | def changelist(**map): |
|
547 | def changelist(**map): | |
531 | parity = 0 |
|
548 | parity = 0 | |
532 | cl = self.repo.changelog |
|
549 | cl = self.repo.changelog | |
@@ -560,6 +577,7 b' class hgweb(object):' | |||||
560 | self.repo.ui.config("web", "author", "unknown")), # also |
|
577 | self.repo.ui.config("web", "author", "unknown")), # also | |
561 | lastchange = cl.read(cl.tip())[2], |
|
578 | lastchange = cl.read(cl.tip())[2], | |
562 | tags = tagentries, |
|
579 | tags = tagentries, | |
|
580 | heads = heads, | |||
563 | shortlog = changelist, |
|
581 | shortlog = changelist, | |
564 | node = hex(cl.tip()), |
|
582 | node = hex(cl.tip()), | |
565 | archives=self.archivelist("tip")) |
|
583 | archives=self.archivelist("tip")) |
@@ -39,6 +39,7 b' filerevchild = \'<tr><td class="metatag">' | |||||
39 | fileannotatechild = '<tr><td class="metatag">child {rev}:</td><td><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>' |
|
39 | fileannotatechild = '<tr><td class="metatag">child {rev}:</td><td><a href="{url}annotate/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>' | |
40 | tags = tags.tmpl |
|
40 | tags = tags.tmpl | |
41 | tagentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>#tag|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/#node|short#{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' |
|
41 | tagentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>#tag|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/#node|short#{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' | |
|
42 | headentry = '<tr class="parity{parity}"><td class="age"><i>{date|age} ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{node|short}</td><td>{branch|escape}</td><td class="link"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">manifest</a></td></tr>' | |||
42 | diffblock = '<pre>#lines#</pre>' |
|
43 | diffblock = '<pre>#lines#</pre>' | |
43 | changelogtag = '<tr><th class="tag">tag:</th><td class="tag">#tag|escape#</td></tr>' |
|
44 | changelogtag = '<tr><th class="tag">tag:</th><td class="tag">#tag|escape#</td></tr>' | |
44 | changesettag = '<tr><td>tag</td><td>#tag|escape#</td></tr>' |
|
45 | changesettag = '<tr><td>tag</td><td>#tag|escape#</td></tr>' |
@@ -36,4 +36,12 b' summary |' | |||||
36 | <tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr> |
|
36 | <tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr> | |
37 | </table> |
|
37 | </table> | |
38 |
|
38 | |||
|
39 | <div><a class="title" | |||
|
40 | href="#">heads</a></div> | |||
|
41 | <table cellspacing="0"> | |||
|
42 | {heads%headentry} | |||
|
43 | <tr class="light"> | |||
|
44 | <td colspan="3"><a class="list" href="#">...</a></td> | |||
|
45 | </tr> | |||
|
46 | </table> | |||
39 | #footer# |
|
47 | #footer# |
General Comments 0
You need to be logged in to leave comments.
Login now