# HG changeset patch # User Anton Shestakov # Date 2015-05-15 10:17:36 # Node ID 917b5a07188843f85f0235197afcdcf25c510ac8 # Parent adfe4d9680bf7e61b5d5c2dc5ca89c9afd5274fb 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. diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py +++ b/mercurial/hgweb/webcommands.py @@ -546,6 +546,7 @@ def manifest(web, req, tmpl): 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)) diff --git a/mercurial/templates/paper/manifest.tmpl b/mercurial/templates/paper/manifest.tmpl --- a/mercurial/templates/paper/manifest.tmpl +++ b/mercurial/templates/paper/manifest.tmpl @@ -30,7 +30,7 @@
-

directory {path|escape} @ {rev}:{node|short} {tags%changelogtag}

+

directory {path|escape} @ {rev}:{node|short} {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}