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

login
register
mail settings
Submitter Anton Shestakov
Date May 18, 2015, 12:47 p.m.
Message ID <1b67030a61c1c9bb3224.1431953224@neuro>
Download mbox | patch
Permalink /patch/9126/
State Accepted
Headers show

Comments

Anton Shestakov - May 18, 2015, 12:47 p.m.
# HG changeset patch
# User Anton Shestakov <engored@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)
Matt Mackall - May 18, 2015, 4:47 p.m.
On Mon, 2015-05-18 at 20:47 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@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)

These are queued for default, thanks. I've changed the summary to
"paper: ...".

Patch

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">