[PATCH 5 of 5] hgweb: show branch/tags/bookmarks when blaming (style=paper) (issue3559)

Anton Shestakov engored at ya.ru
Mon May 18 07:47:04 CDT 2015


# HG changeset patch
# User Anton Shestakov <engored at ya.ru>
# Date 1431691464 -28800
#      Fri May 15 20:04:24 2015 +0800
# Node ID 1b67030a61c1c9bb32243899a35de81f6ad38daa
# Parent  e1357b5c59937ed069c4ceb8480049866ef635c5
hgweb: show branch/tags/bookmarks when blaming (style=paper) (issue3559)

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -953,6 +953,8 @@ def annotate(web, req, tmpl):
                 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')
diff --git a/mercurial/templates/paper/fileannotate.tmpl b/mercurial/templates/paper/fileannotate.tmpl
--- a/mercurial/templates/paper/fileannotate.tmpl
+++ b/mercurial/templates/paper/fileannotate.tmpl
@@ -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}
diff --git a/tests/test-highlight.t b/tests/test-highlight.t
--- a/tests/test-highlight.t
+++ b/tests/test-highlight.t
@@ -236,7 +236,7 @@ hgweb fileannotate, html
   
   <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">
   


More information about the Mercurial-devel mailing list