# HG changeset patch # Parent d100702326d5771823fe98284b7f33bb76556e3e diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -413,7 +413,7 @@ latestentry=lambda **x: entries(1, **x)) def summary(web, req, tmpl): - i = web.repo.tagslist() + i = webutil.bookmarklist(web.repo) + web.repo.tagslist() i.reverse() def tagentries(**map): @@ -721,7 +721,8 @@ user = cgi.escape(templatefilters.person(ctx.user())) branch = ctx.branch() branch = branch, web.repo.branchtags().get(branch) == ctx.node() - data.append((node, vtx, edges, desc, user, age, branch, ctx.tags())) + data.append((node, vtx, edges, desc, user, age, branch, ctx.tags() + + ctx.bookmarks())) return tmpl('graph', rev=rev, revcount=revcount, uprev=uprev, lessvars=lessvars, morevars=morevars, downrev=downrev, diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -87,8 +87,18 @@ return [dict(file=r[0], node=hex(r[1]))] return [] +def bookmarklist(repo): + l = [] + for t, n in repo._bookmarks.iteritems(): + try: + r = repo.changelog.rev(n) + except: + r = -2 # sort to the beginning of the list if unknown + l.append((r, t, n)) + return [(t, n) for r, t, n in sorted(l)] + def nodetagsdict(repo, node): - return [{"name": i} for i in repo.nodetags(node)] + return [{"name": i} for i in repo.nodetags(node) + repo.nodebookmarks(node)] def nodebranchdict(repo, ctx): branches = [] @@ -115,7 +125,7 @@ return branches def showtag(repo, tmpl, t1, node=nullid, **args): - for t in repo.nodetags(node): + for t in repo.nodebookmarks(node) + repo.nodetags(node): yield tmpl(t1, tag=t, **args) def cleanpath(repo, path):