changeset 25136:99d01d288c37

paper: show branch/tags/bookmarks when blaming (issue3559)
author Anton Shestakov <engored@ya.ru>
date Fri, 15 May 2015 20:04:24 +0800
parents 3b689001e7c6
children 85fc79707cb2
files mercurial/hgweb/webcommands.py mercurial/templates/paper/fileannotate.tmpl tests/test-highlight.t
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Fri May 15 20:03:42 2015 +0800
+++ b/mercurial/hgweb/webcommands.py	Fri May 15 20:04:24 2015 +0800
@@ -953,6 +953,8 @@
                 branch=webutil.nodebranchnodefault(fctx),
                 parent=webutil.parents(fctx),
                 child=webutil.children(fctx),
+                tags=webutil.nodetagsdict(web.repo, fctx.node()),
+                bookmarks=webutil.nodebookmarksdict(web.repo, fctx.node()),
                 permissions=fctx.manifest().flags(f))
 
 @webcommand('filelog')
--- a/mercurial/templates/paper/fileannotate.tmpl	Fri May 15 20:03:42 2015 +0800
+++ b/mercurial/templates/paper/fileannotate.tmpl	Fri May 15 20:04:24 2015 +0800
@@ -37,7 +37,7 @@
 
 <div class="main">
 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2>
-<h3>annotate {file|escape} @ {rev}:{node|short}</h3>
+<h3>annotate {file|escape} @ {rev}:{node|short} {branch%changelogbranchname}{tags%changelogtag}{bookmarks%changelogtag}</h3>
 
 <form class="search" action="{url|urlescape}log">
 {sessionvars%hiddenformentry}
--- a/tests/test-highlight.t	Fri May 15 20:03:42 2015 +0800
+++ b/tests/test-highlight.t	Fri May 15 20:04:24 2015 +0800
@@ -236,7 +236,7 @@
   
   <div class="main">
   <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
-  <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
+  <h3>annotate primes.py @ 0:853dcd4de2a6 <span class="tag">tip</span> </h3>
   
   <form class="search" action="/log">