diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py index 90f0c60fb4..f06b9627db 100644 --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -460,6 +460,15 @@ def summary(web, req, tmpl): node=hex(n), date=web.repo[n].date()) + def bookmarks(**map): + parity = paritygen(web.stripecount) + b = web.repo._bookmarks.items() + for k, n in sorted(b)[:10]: # limit to 10 bookmarks + yield {'parity': parity.next(), + 'bookmark': k, + 'date': web.repo[n].date(), + 'node': hex(n)} + def branches(**map): parity = paritygen(web.stripecount) @@ -504,6 +513,7 @@ def summary(web, req, tmpl): owner=get_contact(web.config) or "unknown", lastchange=tip.date(), tags=tagentries, + bookmarks=bookmarks, branches=branches, shortlog=changelist, node=tip.hex(), diff --git a/mercurial/templates/gitweb/summary.tmpl b/mercurial/templates/gitweb/summary.tmpl index f721069c0f..8a5814e3a5 100644 --- a/mercurial/templates/gitweb/summary.tmpl +++ b/mercurial/templates/gitweb/summary.tmpl @@ -50,6 +50,12 @@ summary | ... +
bookmarks
+ +{bookmarks%bookmarkentry} + +
...
+
branches
{branches%branchentry} diff --git a/mercurial/templates/monoblue/summary.tmpl b/mercurial/templates/monoblue/summary.tmpl index 1d6b960d0b..9528dc6259 100644 --- a/mercurial/templates/monoblue/summary.tmpl +++ b/mercurial/templates/monoblue/summary.tmpl @@ -58,6 +58,14 @@
+

Bookmarks

+ + {bookmarks%bookmarkentry} + + + +
...
+ {branches%branchentry} diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t index 15ee58b1e2..e717123dba 100644 --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -723,6 +723,30 @@ Overviews
...
+
bookmarks
+ + + + + + + + + + + + + +
1970-01-01anotherthing
1970-01-01something
...
+
branches