paper: show branch/tags/bookmarks when blaming (issue3559)
authorAnton Shestakov <engored@ya.ru>
Fri, 15 May 2015 20:04:24 +0800
changeset 25136 99d01d288c37
parent 25135 3b689001e7c6
child 25137 85fc79707cb2
paper: show branch/tags/bookmarks when blaming (issue3559)
mercurial/hgweb/webcommands.py
mercurial/templates/paper/fileannotate.tmpl
tests/test-highlight.t
--- 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">