changeset 25132:917b5a071888

paper: show branch/tags/bookmarks when browsing (issue3559) Browse (or manifest) action allows browsing the directory structure at some specified revision. In gitweb and monoblue styles, the revision header already has branch/tag/bookmark information for the revision, but in paper style this header was only showing tags. This patch adds branches and bookmarks. Branch name needs to be obtained in this special way to be consistent with regular changeset page, where in paper style default branch is never shown.
author Anton Shestakov <engored@ya.ru>
date Fri, 15 May 2015 18:17:36 +0800
parents adfe4d9680bf
children 3d82c517b9c5
files mercurial/hgweb/webcommands.py mercurial/templates/paper/manifest.tmpl
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Sat May 16 21:42:09 2015 +0900
+++ b/mercurial/hgweb/webcommands.py	Fri May 15 18:17:36 2015 +0800
@@ -546,6 +546,7 @@
                 archives=web.archivelist(hex(node)),
                 tags=webutil.nodetagsdict(web.repo, node),
                 bookmarks=webutil.nodebookmarksdict(web.repo, node),
+                branch=webutil.nodebranchnodefault(ctx),
                 inbranch=webutil.nodeinbranch(web.repo, ctx),
                 branches=webutil.nodebranchdict(web.repo, ctx))
 
--- a/mercurial/templates/paper/manifest.tmpl	Sat May 16 21:42:09 2015 +0900
+++ b/mercurial/templates/paper/manifest.tmpl	Fri May 15 18:17:36 2015 +0800
@@ -30,7 +30,7 @@
 
 <div class="main">
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
-<h3>directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}</h3>
+<h3>directory {path|escape} @ {rev}:{node|short} {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}</h3>
 
 <form class="search" action="{url|urlescape}log">
 {sessionvars%hiddenformentry}